From c9acd8875f58bb8f58026d2b10bf67b733961045 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Fri, 26 Nov 2021 09:42:46 +0100 Subject: [PATCH] Enable paging stuff --- kernel/enable_paging.asm | 3 +++ kernel/kernel.c | 2 +- kernel/paging.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/enable_paging.asm b/kernel/enable_paging.asm index cc835bf..5412ab7 100644 --- a/kernel/enable_paging.asm +++ b/kernel/enable_paging.asm @@ -13,3 +13,6 @@ enable_paging_registers: or eax, PAGING_ENABLE ; perform the OR operation on eax (ex: 0b01 or 0b10 = 0b11) ; This is needed to enable paging (set the flag as "enabled") mov cr0, eax ; Move it into cr0 to finally enable paging + + +global enable_paging_registers ; make the SR "global" so that we can access it in the kernel etc diff --git a/kernel/kernel.c b/kernel/kernel.c index 70a0a72..14c61da 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -14,7 +14,7 @@ void init() { println(""); - char* title = "eOS Version 0.2 2021"; + char* title = "eOS Version 0.3 2021"; println(title, DEFAULT_COLOR); char* subtitle = "A x86 operating system, licenced under GPL-2.0"; diff --git a/kernel/paging.c b/kernel/paging.c index 7b5dc52..a51c366 100644 --- a/kernel/paging.c +++ b/kernel/paging.c @@ -4,7 +4,7 @@ void enable_paging() { println("Enabling paging...", DEFAULT_COLOR); - extern int enable_paging_registers(); // Call the assembly SR + extern void enable_paging_registers(); // Call the assembly SR enable_paging_registers(); return;