Recursive Page Table Lookup in the x86 CSCE 410/611 Recursive Page Table Lookup in the x86 How to access PDEs and PTEs in virtual memory? RECAP: Address Translation in the x86 Accessing PTEs and PDEs? Addressing a PTE using RPTL Addressing a PDE using RPTL Recursive Page Table Lookup
RECAP: Logical Address Translation in x86 CSCE 410/611 RECAP: Logical Address Translation in x86 CPU X (10bit) X (10bit) Y (10bit) Y (10bit) D (12bit) D (12bit) PTBR page directory X PDE page table page Y frame in phys. memory PTE D mem loc Mantra: “PDE => PTE => Memory Location” Recursive Page Table Lookup
Accessing PTEs and PDEs?! CSCE 410/611 Accessing PTEs and PDEs?! CPU X (10bit) ?!?! FPTP (20bit) Y (10bit) ?!?! D (12bit) Y (10bit) 00 Phys. Address of entry: FPTP | Y | 00 PTBR page directory X FPTP CPU issues logical addresses!! PDE FPTP page table page Y frame in phys. memory PTE D Modify this entry?! mem loc Mantra: “PDE => PTE => Memory Location” Recursive Page Table Lookup
Addressing a PTE using Recursive Table Lookup CSCE 410/611 Addressing a PTE using Recursive Table Lookup CPU X(10bit) Y (10bit) 1023 (10bit) 1023 (10bit) X (10bit) X (10bit) Y (10bit) Y (10bit) 00 00 PTBR FPD page directory FPTP FPDP page table page 1023 PTE PTE FPD Mantra: “PDE => PTE => Memory Location” Recursive Page Table Lookup
Addressing a PTE using Recursive Table Lookup CSCE 410/611 Addressing a PTE using Recursive Table Lookup CPU X(10bit) Y (10bit) 1023 (10bit) 1023 (10bit) X (10bit) Y (10bit) 00 PTBR FPD page directory FPTP FPDP page table page 1023 PTE PTE FPD Mantra: “PDE => PTE => Memory Location” Recursive Page Table Lookup
Addressing a PTE using Recursive Table Lookup CSCE 410/611 Addressing a PTE using Recursive Table Lookup CPU X(10bit) Y (10bit) 1023 (10bit) 1023 (10bit) X (10bit) X (10bit) Y (10bit) 00 PTBR FPD page directory X FPTP FPDP page table page 1023 PTE PTE FPD Mantra: “PDE => PTE => Memory Location” Recursive Page Table Lookup
Addressing a PTE using Recursive Table Lookup CSCE 410/611 Addressing a PTE using Recursive Table Lookup CPU X(10bit) Y (10bit) 1023 (10bit) 1023 (10bit) X (10bit) X (10bit) Y (10bit) Y (10bit) 00 00 PTBR FPD page directory X FPTP FPDP page table page 1023 Y*4 frame in phys. memory PTE PTE FPD Mantra: “PDE => PTE => Memory Location” Recursive Page Table Lookup
Addressing a PDE using Recursive Table Lookup CSCE 410/611 Addressing a PDE using Recursive Table Lookup CPU X(10bit) 1023 (10bit) 1023 (10bit) X (10bit) 00 PTBR FPD PDE PDE 1023 1023 FPD Mantra: “PDE => PTE => Memory Location” Recursive Page Table Lookup
Addressing a PDE using Recursive Table Lookup CSCE 410/611 Addressing a PDE using Recursive Table Lookup CPU X(10bit) 1023 (10bit) 1023 (10bit) 1023 (10bit) X (10bit) 00 PTBR FPD PDE PDE 1023 1023 FPD Mantra: “PDE => PTE => Memory Location” Recursive Page Table Lookup
Addressing a PDE using Recursive Table Lookup CSCE 410/611 Addressing a PDE using Recursive Table Lookup CPU X(10bit) 1023 (10bit) 1023 (10bit) 1023 (10bit) 1023 (10bit) X (10bit) 00 PTBR FPD PDE PDE 1023 1023 FPD Mantra: “PDE => PTE => Memory Location” Recursive Page Table Lookup
Addressing a PDE using Recursive Table Lookup CSCE 410/611 Addressing a PDE using Recursive Table Lookup CPU X(10bit) 1023 (10bit) 1023 (10bit) 1023 (10bit) 1023 (10bit) X (10bit) X (10bit) 00 00 PTBR FPD X*4 PDE PDE 1023 1023 FPD Mantra: “PDE => PTE => Memory Location” Recursive Page Table Lookup
Memory Usage of Recursive Table Lookup CSCE 410/611 Memory Usage of Recursive Table Lookup logical address space FPD page table 4MB Page Directory Recursive Page Table Lookup