I am trying to understand the kernel memory reservation at bootup for arch/arm.
There's a call paging_init() for setting page tables, initialization of zone memory map etc in setup_arch()
. It also allocate one zero page
before allocating actual mem_map
.
void __init paging_init(const struct machine_desc *mdesc)
{
void *zero_page;
---
zero_page = early_alloc(PAGE_SIZE);
---
empty_zero_page = virt_to_page(zero_page);
__flush_dcache_page(NULL, empty_zero_page);
}
Can someone please explain the role of zero page
?
This question is a part of this.