PDPT Present flag
Posted: Sat Oct 19, 2013 3:36 pm
Hi all,
I have a question regarding PAE. In the Wiki (http://wiki.osdev.org/Setting_Up_Paging_With_PAE) the PDPT has only one entry with the "present" bit set to 1. The other 3 entries are unused and thus it seems that they are not required to be present. However, when looking up the PDPT in the Intel manual (https://communities.intel.com/servlet/J ... amming.pdf page 3-35) it says:
Is this correct? If so, it seems the Wiki is slightly wrong. But then again, I've tried the Wiki's method and it works fine. So is this simply undefined behaviour (even though it specifically says an exception must be generated)? Or am I missing something here?
Thanks in advance
I have a question regarding PAE. In the Wiki (http://wiki.osdev.org/Setting_Up_Paging_With_PAE) the PDPT has only one entry with the "present" bit set to 1. The other 3 entries are unused and thus it seems that they are not required to be present. However, when looking up the PDPT in the Intel manual (https://communities.intel.com/servlet/J ... amming.pdf page 3-35) it says:
So that seems to indicate one would need to make 4 valid page directories before enabling PAE. If they are unused, it seems that they should point to an all-zero page directories (at least none of the pages being marked present), and the entries in the PDPT pointing to these all-zero page directories with the present bit being set to 1.The present (P) flag (bit 0) in all page-directory-pointer-table entries must be set to 1 anytime extended physical addressing mode is enabled; that is, whenever the PAE flag (bit 5 in register CR4) and the PG flag (bit 31 in register CR0) are set. If the P flag is not set in all 4 page-direc- tory-pointer-table entries in the page-directory-pointer table when extended physical addressing is enabled, a general-protection exception (#GP) is generated.
Is this correct? If so, it seems the Wiki is slightly wrong. But then again, I've tried the Wiki's method and it works fine. So is this simply undefined behaviour (even though it specifically says an exception must be generated)? Or am I missing something here?
Thanks in advance