File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -314,10 +314,16 @@ pde_low: ; Create a 2MiB page
314314; PDPTE is stored at 0x0000000000003000, create the first entry there
315315; A single PDPTE can map 1GiB
316316; A single PDPTE is 8 bytes in length
317- ; 512 entries are created to map the first 512GiB of RAM
317+ ; 1024 entries are created to map the first 1024GiB of RAM
318318pdpte_1GB:
319- mov ecx , 512 ; number of PDPE's to make.. each PDPE maps 1GiB of physical memory
320- mov edi , 0x00003000 ; location of low PDPE
319+ ; Overwrite the original PML4 entry for physical memory
320+ mov edi , 0x00002000 ; Create a PML4 entry for physical memory
321+ mov eax , 0x00010003 ; Bits 0 (P), 1 (R/W), location of low PDP (4KiB aligned)
322+ stosq
323+ add eax , 0x1000
324+ stosq
325+ mov ecx , 1024 ; number of PDPE's to make.. each PDPE maps 1GiB of physical memory
326+ mov edi , 0x00010000 ; location of low PDPE
321327 mov eax , 0x00000083 ; Bits 0 (P), 1 (R/W), 7 (PS)
322328pdpte_low_1GB: ; Create a 1GiB page
323329 stosq
You can’t perform that action at this time.
0 commit comments