aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/boot
diff options
context:
space:
mode:
authorFabian Imhof <fabian.imhof@ost.ch>2024-10-15 15:48:43 +0000
committerFabian Imhof <fabian.imhof@ost.ch>2024-10-15 15:48:43 +0000
commit0c4fd9eaed4a71975879aa83cd2da4b6266a64b5 (patch)
tree0fb3ef311223e4a9a36ba9fc0fa0e7af1c312596 /arch/x86_64/src/boot
parent429d99ca40254e9e19da938ff9f2065a543708cd (diff)
downloadteachos-0c4fd9eaed4a71975879aa83cd2da4b6266a64b5.tar.xz
teachos-0c4fd9eaed4a71975879aa83cd2da4b6266a64b5.zip
add 4th level page table
Diffstat (limited to 'arch/x86_64/src/boot')
-rw-r--r--arch/x86_64/src/boot/boot.s6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86_64/src/boot/boot.s b/arch/x86_64/src/boot/boot.s
index 0c21c66..29ac58d 100644
--- a/arch/x86_64/src/boot/boot.s
+++ b/arch/x86_64/src/boot/boot.s
@@ -264,6 +264,12 @@ enable_paging:
mov $page_map_level_4, %eax
mov %eax, %cr3
+ /* Map the P4 table recursively */
+ mov $page_map_level_4, %eax
+ or 0b11, %eax
+ // TODO: WHY THIS THROW ERROR?
+ mov %eax, [$page_map_level_4 + 511 * 8]
+
/* Enable Physical Address Extension */
mov %cr4, %eax
or $(1 << 5), %eax