From 32453daf66a0ba10573c361469a78f98ce54f3ad Mon Sep 17 00:00:00 2001 From: Bananymous Date: Fri, 13 Jan 2023 14:45:45 +0200 Subject: [PATCH] Kernel: actually dont map page 0 --- kernel/arch/i386/MMU.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/arch/i386/MMU.cpp b/kernel/arch/i386/MMU.cpp index 589490ea5..80f86ebfa 100644 --- a/kernel/arch/i386/MMU.cpp +++ b/kernel/arch/i386/MMU.cpp @@ -63,7 +63,7 @@ MMU::MMU() // dont map first page (0 -> 4 KiB) so that nullptr dereference // causes page fault :) - uint64_t* page_table1 = (uint64_t*)page_directory1[0]; + uint64_t* page_table1 = (uint64_t*)(page_directory1[0] & PAGE_MASK); page_table1[0] = 0; // reload this new pdpt