[Barrelfish-users] [Barrelfish] boot page table init on x86-64

Simon Peter speter at inf.ethz.ch
Fri Apr 15 13:44:58 CEST 2011


> In kernel/arch/x86_64/init.c, paging_x86_64_reset() is called in text_init(). paging_x86_64_reset() just maps first megabytes and kernel to MEMORY_OFFSET, however, since those two regions are guaranteed to be included in [0, X86_64_PADDR_SPACE_LIMIT), which is the maximum physical address space, why not just map [0, X86_64_PADDR_SPACE_LIMIT) in paging_x86_64_reset() but instead map those regions first in paging_x86_64_reset() then map the whole physical memory in text_init()?

As the comment above the line that maps until X86_64_PADDR_SPACE_LIMIT 
says, this is just until we have a reliable way to detect and create 
mappings for RAM, after bootup is completed.

What this means is that the line mapping all of X86_64_PADDR_SPACE_LIMIT 
shouldn't be there and the kernel should just be mapping a minimum 
amount of memory that it needs to boot (ie. what it maps in 
paging_x86_64_reset()). After that, a user space program (most likely 
'pci') should do hardware discovery and create additional RAM mappings 
in the kernel.

Feel free to add support for this if you like.

Simon



More information about the Barrelfish-users mailing list