Enable paging stuff

paging
E. Almqvist 3 years ago
parent 2d05fb1364
commit c9acd8875f
  1. 3
      kernel/enable_paging.asm
  2. 2
      kernel/kernel.c
  3. 2
      kernel/paging.c

@ -13,3 +13,6 @@ enable_paging_registers:
or eax, PAGING_ENABLE ; perform the OR operation on eax (ex: 0b01 or 0b10 = 0b11) 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") ; This is needed to enable paging (set the flag as "enabled")
mov cr0, eax ; Move it into cr0 to finally enable paging 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

@ -14,7 +14,7 @@ void init() {
println(""); println("");
char* title = "eOS Version 0.2 2021"; char* title = "eOS Version 0.3 2021";
println(title, DEFAULT_COLOR); println(title, DEFAULT_COLOR);
char* subtitle = "A x86 operating system, licenced under GPL-2.0"; char* subtitle = "A x86 operating system, licenced under GPL-2.0";

@ -4,7 +4,7 @@
void enable_paging() { void enable_paging() {
println("Enabling paging...", DEFAULT_COLOR); 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(); enable_paging_registers();
return; return;

Loading…
Cancel
Save