From 650570e57d0c1cb25f7edbc6d877117bad61c3f2 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 31 May 2023 00:39:06 +0300 Subject: [PATCH] Kernel: Fix comment --- kernel/arch/x86_64/PageTable.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/arch/x86_64/PageTable.cpp b/kernel/arch/x86_64/PageTable.cpp index 0b3a216985..d36904bdd2 100644 --- a/kernel/arch/x86_64/PageTable.cpp +++ b/kernel/arch/x86_64/PageTable.cpp @@ -73,11 +73,8 @@ namespace Kernel void PageTable::initialize_kernel() { + // Map (0 -> phys_kernel_end) to (KERNEL_OFFSET -> virt_kernel_end) m_highest_paging_struct = V2P(allocate_page_aligned_page()); - memset((void*)P2V(m_highest_paging_struct), 0, PAGE_SIZE); - - // Identity map 4 KiB -> kernel end. We don't map the first page since nullptr derefs should - // page fault. Also there isn't anything useful in that memory. map_range_at(0, KERNEL_OFFSET, (uintptr_t)g_kernel_end - KERNEL_OFFSET, Flags::ReadWrite | Flags::Present); }