From 73c58bd902bc92da361a052cb31909d9250d7f49 Mon Sep 17 00:00:00 2001 From: apio Date: Mon, 26 Dec 2022 12:12:55 +0100 Subject: [PATCH] Init: Move platform_init() before MemoryManager::init() This enables NX before we actually use it. Wasn't causing problems with KVM on, but crashed with KVM off with a 'reserved bit set' page fault. --- kernel/src/boot/Init.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/src/boot/Init.cpp b/kernel/src/boot/Init.cpp index e28471ab..2c413a02 100644 --- a/kernel/src/boot/Init.cpp +++ b/kernel/src/boot/Init.cpp @@ -28,10 +28,10 @@ void Init::early_init() setup_log(log_debug_enabled(), log_serial_enabled(), true); + CPU::platform_init(); + MemoryManager::init(); InitRD::initialize(); - CPU::platform_init(); - MemoryManager::protect_kernel_sections().expect_release_value("We should succeed to protect sections"); } \ No newline at end of file