diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-01-11 06:25:38 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-01-11 06:25:38 +0100 |
commit | 93af394f5d55445b22fa50e99d8f8376cb34e8e1 (patch) | |
tree | 4ac290be5b2303d395fd89113ea6b5de8b2ccff1 /kernel | |
parent | 1f061145327d255a97ca0fff6960744a12b42863 (diff) |
Switch to stack in virtual memory before calling main().
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/entry.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/entry.c b/kernel/entry.c index d288027..2496d21 100644 --- a/kernel/entry.c +++ b/kernel/entry.c @@ -18,7 +18,7 @@ extern void main(); asm( ".globl entry\n" "entry:\n" - "mov $entry_stack_top,%esp\n" + "mov $entry_stack_top, %esp\n" "push %ebx\n" "push %eax\n" "call entry_main\n" @@ -83,6 +83,7 @@ void entry_main(uint32_t mb_magic, multiboot_info* mb_info) { // TODO: Check that segments are loaded and mapped right. // Call main() in virtual memory. + asm volatile("mov $0, %esp"); main(); stop: |