diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-01-29 20:23:53 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-01-29 20:23:53 +0100 |
commit | 37db7181daf1cc10683de24f6203e595b2ac49bc (patch) | |
tree | 6fd009ef0206a3b2a836fd7d0b2e816f02422816 /kernel/main.c | |
parent | 81e59db8151915250df68f79f7afde1f1ce8dac3 (diff) |
Copy multiboot information.
Diffstat (limited to 'kernel/main.c')
-rw-r--r-- | kernel/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/main.c b/kernel/main.c index 93647f5..5cc94d3 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -2,6 +2,7 @@ #include "gdt.h" #include "idt.h" #include "irq.h" +#include "multiboot.h" void main() { printf("main()\n"); @@ -15,6 +16,11 @@ void main() { irq_init(); printf("IRQs set.\n"); + printf("Multiboot flags: %08x\n", multiboot_info.flags); + for(int i = 0; i < multiboot_info.mods_count; i++) { + printf("Module %u: %08x %08x %s\n", i, multiboot_info.mods_addr[0].mod_start, multiboot_info.mods_addr[0].mod_end, multiboot_info.mods_addr[0].string); + } + asm volatile("sti"); asm volatile( @@ -22,8 +28,9 @@ void main() { "push $entry_stack_top\n" "pushf\n" "push $0x1b\n" - "push $0x0010a000\n" + "push %0\n" "iret\n" + :: "r" (multiboot_info.mods_addr[0].mod_start) ); printf("Halting.\n"); |