From 0c4fd9eaed4a71975879aa83cd2da4b6266a64b5 Mon Sep 17 00:00:00 2001 From: Fabian Imhof Date: Tue, 15 Oct 2024 15:48:43 +0000 Subject: add 4th level page table --- arch/x86_64/src/boot/boot.s | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/x86_64/src/boot') 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 -- cgit v1.2.3