From 3654cc5bee06a1b0a28928b709475cad6a5ab314 Mon Sep 17 00:00:00 2001 From: apio Date: Mon, 27 Feb 2023 13:24:58 +0100 Subject: [PATCH] MemoryManager: Initialize KernelVM at the end of init() KernelVM is not needed for MMU's init process anymore. --- kernel/src/memory/MemoryManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/src/memory/MemoryManager.cpp b/kernel/src/memory/MemoryManager.cpp index 3160f808..fb7f57ee 100644 --- a/kernel/src/memory/MemoryManager.cpp +++ b/kernel/src/memory/MemoryManager.cpp @@ -100,7 +100,7 @@ namespace MemoryManager void init() { init_physical_frame_allocator(); - KernelVM::init(); + MMU::setup_initial_page_directory(); auto frame_bitmap = g_frame_bitmap.lock(); @@ -108,6 +108,8 @@ namespace MemoryManager auto virtual_bitmap_base = MMU::translate_physical_address(phys); frame_bitmap->initialize((void*)virtual_bitmap_base, frame_bitmap->size_in_bytes()); + + KernelVM::init(); } void do_lock_frame(u64 index, Bitmap& bitmap)