aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Borner2020-04-17 14:31:30 +0200
committerMarvin Borner2020-04-17 14:31:30 +0200
commit1d763a07224504b645aea2f42699722ad0030cfb (patch)
treeac62ccef9f8df588125ed51fa4e88b727821b023
parent203c6950ab45e89ababa594d5b359118e17bfd02 (diff)
OMG I feel very dumb now...
I forgot to actually pass the address to the parser! Why tf doesn't GCC tell me that? :D
-rw-r--r--src/kernel/boot.asm16
-rw-r--r--src/kernel/kernel.c2
-rw-r--r--src/kernel/multiboot.c21
3 files changed, 26 insertions, 13 deletions
diff --git a/src/kernel/boot.asm b/src/kernel/boot.asm
index 9086dbd..5ce6014 100644
--- a/src/kernel/boot.asm
+++ b/src/kernel/boot.asm
@@ -4,21 +4,21 @@ section .multiboot
dd 0
dd header_end - header_start
dd 0x100000000 - (0xe85250d6 + 0 + (header_end - header_start))
- mb2_tag_info_start:
+
+ ; Information tag (force)
+ align 8
dw 1
- dw 0 ; Non-optional
- dd mb2_tag_info_end - mb2_tag_info_start
- dd 1
+ dw 0
+ dd 20
dd 2
dd 4
dd 6
- mb2_tag_info_end:
+
+ ; Empty tag
align 8
- mb2_tag_end_start:
dw 0
dw 0
- dd mb2_tag_end_end - mb2_tag_end_start
- mb2_tag_end_end:
+ dd 8
header_end:
section .start_section
diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c
index 6a9bc09..bf58e23 100644
--- a/src/kernel/kernel.c
+++ b/src/kernel/kernel.c
@@ -41,7 +41,7 @@ void kernel_main(uint32_t magic, uint32_t multiboot_address)
isrs_install();
irq_install();
- multiboot_parse();
+ multiboot_parse(multiboot_address);
paging_install();
memory_print();
diff --git a/src/kernel/multiboot.c b/src/kernel/multiboot.c
index a8fdc3c..6b402fa 100644
--- a/src/kernel/multiboot.c
+++ b/src/kernel/multiboot.c
@@ -11,45 +11,58 @@ void multiboot_parse(uint32_t multiboot_address)
for (tag = (struct multiboot_tag *)(multiboot_address + 8);
tag->type != MULTIBOOT_TAG_TYPE_END;
tag = (struct multiboot_tag *)((multiboot_uint8_t *)tag + ((tag->size + 7) & ~7))) {
- //log("Tag 0x%x, Size 0x%x", tag->type, tag->size);
switch (tag->type) {
case MULTIBOOT_TAG_TYPE_CMDLINE:
- //info("Command line: %s", ((struct multiboot_tag_string *)tag)->string);
+ info("Got cmdline");
break;
case MULTIBOOT_TAG_TYPE_BOOT_LOADER_NAME:
- //info("Bootloader name: %s", ((struct multiboot_tag_string *)tag)->string);
+ info("Got bootloader name: %s", ((struct multiboot_tag_string *) tag)->string);
break;
case MULTIBOOT_TAG_TYPE_MODULE:
+ info("Got modules");
break;
case MULTIBOOT_TAG_TYPE_BASIC_MEMINFO:
- log("YAY");
+ info("Got memory info");
memory_init((struct multiboot_tag_basic_meminfo *)tag);
break;
case MULTIBOOT_TAG_TYPE_BOOTDEV:
+ info("Got boot device");
break;
case MULTIBOOT_TAG_TYPE_MMAP:
+ info("Got memory map");
break;
case MULTIBOOT_TAG_TYPE_VBE:
+ info("Got VBE info");
break;
case MULTIBOOT_TAG_TYPE_FRAMEBUFFER:
+ info("Got framebuffer info");
break;
case MULTIBOOT_TAG_TYPE_APM:
+ info("Got APM table");
break;
case MULTIBOOT_TAG_TYPE_EFI32:
+ info("Got EFI32");
break;
case MULTIBOOT_TAG_TYPE_ACPI_OLD:
+ info("Got ACPI table");
break;
case MULTIBOOT_TAG_TYPE_ACPI_NEW:
+ info("Got new ACPI table");
break;
case MULTIBOOT_TAG_TYPE_NETWORK:
+ info("Got network info");
break;
case MULTIBOOT_TAG_TYPE_EFI_MMAP:
+ info("Got EFI memory map");
break;
case MULTIBOOT_TAG_TYPE_EFI_BS:
+ info("Got EFI boot services");
break;
case MULTIBOOT_TAG_TYPE_EFI32_IH:
+ info("Got EFI image handler pointer");
break;
case MULTIBOOT_TAG_TYPE_LOAD_BASE_ADDR:
+ info("Got image load base address");
break;
}
}