Pass multiboot magic and header to kmain

This commit is contained in:
Sam Tebbs 2019-05-18 16:26:44 +01:00 committed by SamTebbs33
parent bc54f0ef09
commit 3c12803954
3 changed files with 498 additions and 4 deletions

View file

@ -96,6 +96,13 @@ export nakedcc fn start_higher_half() noreturn {
\\mov $KERNEL_STACK_END, %%esp
\\mov %%esp, %%ebp
);
// Push the bootloader magic number and multiboot header address with virtual offset
asm volatile (
\\.extern KERNEL_ADDR_OFFSET
\\push %%eax
\\add $KERNEL_ADDR_OFFSET, %%ebx
\\push %%ebx
);
kmain();
while (true) {}
}