summaryrefslogtreecommitdiff
path: root/src/arch/amd64/boot.S
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-01-28 19:22:09 -0500
committerFreya Murphy <freya@freyacat.org>2024-01-28 19:22:09 -0500
commit6957948f3af47f5b57770ac1692843bba768c285 (patch)
tree247d3709d6414fa68a582b9bd6e8deb62547760c /src/arch/amd64/boot.S
parentMerge remote-tracking branch 'origin/main' (diff)
downloadcorn-6957948f3af47f5b57770ac1692843bba768c285.tar.gz
corn-6957948f3af47f5b57770ac1692843bba768c285.tar.bz2
corn-6957948f3af47f5b57770ac1692843bba768c285.zip
memory changes
Diffstat (limited to 'src/arch/amd64/boot.S')
-rw-r--r--src/arch/amd64/boot.S19
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.