PAE is the physical Address extension. Our usual addressing method is to address the page directory, page table, page offset, and the way the virtual addresses were previously addressed in 10 10 12, but the addressing mode after the start of PAE has changed to address the 32-bit virtual addresses into 2 9 9 12:
The theory does not repeat, and the ordinary way of addressing is not much different, specific can refer to the previous article: x86 virtual Address to the physical address of the study, the main difference is the two-level page table derived into a three-level page table.
31~30: Index of page directory pointer table
21~29: Page Catalog Table index
12~20: Page Table index
0~11: In-page offset
Here's a simple example to learn:
int _tmain (int argc, _tchar* argv[]) { char szname[ HelloWorld"; printf ("szname:%x\n", szName); GetChar (); return 0 ;}
The printed address is 0x12ff4c, and we will then find our "Hello world" in the physical address.
F f4c
Page Catalog Pointer table index page Catalog table index page Table index page internal offset
00 0 0000 000 1 0010 1111 1111 0100 1100
0 0 12f f4c
The physical address of the page table directory pointer for the CC.EXX process is 10b00200, and the target directory pointer index is 0, so it is 5a8a4001, so the physical first address of the page catalog table is 5a8a4000.
and our page Catalog Table index is also 0:
The physical page header address of the page table is 5a5b3000, and the page table index is 0x12f so the page table entry is 5a5b3000+0x12f*8:
So our first physical page address is 5a8b7000, and the page offset is: f4c, so the physical address of szname is 5a8b7f4c:
Windows PAE Addressing