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

"Siyao Zheng(郑思遥)" zhengsyao at gmail.com
Fri Apr 15 14:09:06 CEST 2011

[sorry about the previous one, I forgot cc]

Thank you, that's quite enough for me.

By the way, I think it probably best to detect RAM mapping in kernel at this stage, or at least map the page where "global" structure resides, or else printf would not be available at the moment. 

On Apr 15, 2011, at 7:44 PM, Simon Peter wrote:

>> 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