Pass multiboot magic and header to kmain
This commit is contained in:
parent
bc54f0ef09
commit
3c12803954
3 changed files with 498 additions and 4 deletions
|
|
@ -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) {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue