From f2d454d3d5328901083487d966ed237995255a14 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Fri, 26 Nov 2021 10:04:41 +0100 Subject: [PATCH] Implemented a nice kernel death. Nothing works --- kernel/enable_paging.asm | 3 +++ kernel/kernel.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/enable_paging.asm b/kernel/enable_paging.asm index 4a90dd2..ff66fc7 100644 --- a/kernel/enable_paging.asm +++ b/kernel/enable_paging.asm @@ -13,7 +13,10 @@ enable_paging_registers: mov eax, cr0 ; eax as a middle-man register (again) or eax, PAGING_ENABLE_FLAG ; perform the OR operation on eax (ex: 0b01 or 0b10 = 0b11) ; This is needed to enable paging (set the flag as "enabled") + + ; DANGER: past this op memory will get weird mov cr0, eax ; Move it into cr0 to finally enable paging + ; TODO: Make this work to prevent kernel "panic" (actually death) -> bootloop ret ; return to last location diff --git a/kernel/kernel.c b/kernel/kernel.c index 14c61da..66e2c3f 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -12,7 +12,6 @@ void init() { enable_paging(); - println(""); char* title = "eOS Version 0.3 2021"; println(title, DEFAULT_COLOR);