gets the memory map from GRUB

This commit is contained in:
2025-06-09 17:44:50 -04:00
parent f1515ad7b5
commit 83b6a9eaf2
8 changed files with 352 additions and 7 deletions

View File

@ -3,7 +3,7 @@
; We set up some parameters and then pass the execution to our kmain
global loader ; entry symbol for ELF
extern kmain
extern _main
MAGIC_NUMBER equ 0x1BADB002 ; magic number constant
FLAGS equ 0x3
@ -30,7 +30,10 @@ section .text
loader:
mov esp, kernel_stack + KERNEL_STACK_SIZE ; move the top of the stack into esp
call kmain ; pass execution over to our kmain function, where all of the real stuff is done
push eax
push ebx
call _main ; pass execution over to our _main function, where all of the real stuff is done
; Should the system exit, we clear the interrupt flag
; and do an infinite loop of nothing