holy crap im an idiot, i was getting constatnt gpf because i forgot to pop the stack
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
|
||||
global loader ; entry symbol for ELF
|
||||
extern kmain
|
||||
extern gdt_init
|
||||
|
||||
MAGIC_NUMBER equ 0x1BADB002 ; magic number constant
|
||||
FLAGS equ 0x3
|
||||
@ -30,6 +31,8 @@ section .text
|
||||
loader:
|
||||
mov esp, kernel_stack + KERNEL_STACK_SIZE ; move the top of the stack into esp
|
||||
|
||||
call gdt_init
|
||||
|
||||
call kmain ; pass execution over to our kmain function, where all of the real stuff is done
|
||||
|
||||
; Should the system exit, we clear the interrupt flag
|
||||
|
Reference in New Issue
Block a user