PDPT Pointer Bits


I am trying to boot a custom build of Appleā€™s XNU kernel (sources). The boot is dying due to an unhandled page fault. I have traced the cause of the crash to the BootPDPT symbol. The job of the BootPDPT is to point to the page-table entries in the BootPDT symbol.

The problem is, as I currently understand the x86 PDPT, the low 16 bits or so are flags, and the address is located in the high 16 bits. (I checked OSDev for my research). Does this mean that I need to shift that address so it will be resolved properly?

I am asking this because the MMU is unable to locate the page table entries. I believe that this is due to the value 0x00102000 (the address of the BootPDT) being interpreted as 0x00000102 due to value shifting.

If I do need to shift the address left, how many bits would I shift the value by, and how do I do this in assembler without mangling the flags in the low 16 bits?

asked on Stack Overflow Jan 18, 2014 by wjk

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0