summaryrefslogtreecommitdiff
path: root/kernel/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/main.c')
-rw-r--r--kernel/main.c9
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");