diff options
Diffstat (limited to '')
-rw-r--r-- | src/arch/amd64/boot.S | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/arch/amd64/boot.S b/src/arch/amd64/boot.S index 36e4bc6..447ac2f 100644 --- a/src/arch/amd64/boot.S +++ b/src/arch/amd64/boot.S @@ -1,4 +1,9 @@ global start +global pml4_list +global init_pdpt +global init_pd +global init_pt +global paging_pt extern kmain extern amd64_shim bits 32 @@ -19,6 +24,18 @@ dd 8 mb_end: section .bss +align 4096 +pml4_list: ; reserve memory for initial 512 pml4 entires + resb 4096 +init_pdpt: ; reserve memory for initial 512 pdpt entires + resb 4096 +init_pd: ; reserve memory for initial 512 pd entries + resb 4096 +init_pt: ; reserve memory for initial 512 pt entries + resb 4096 +paging_pt: ; reserve memory for 512 paging reserved pt entires + resb 4096 + align 16 stack_start: resb 16384 @@ -76,7 +93,7 @@ start: mov ecx, 4096 rep stosd mov edi, cr3 - + ; FIXME: Update boot.S to point base of paging to pml4e_list, see above mov DWORD [edi], 0x2003 ; Set the uint32_t at the destination index to 0x2003. add edi, 0x1000 ; Add 0x1000 to the destination index. mov DWORD [edi], 0x3003 ; Set the uint32_t at the destination index to 0x3003. |