summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/boot.c
diff options
context:
space:
mode:
authordzwdz2022-07-17 14:39:45 +0200
committerdzwdz2022-07-17 14:39:45 +0200
commit51cbabd0f40b041fa00203266afa046d14e88b22 (patch)
tree75022bc959b32e72876dfe3449faecac6feb5caa /src/kernel/arch/amd64/boot.c
parent4c10db944ca18c8001848c7e4e8ef51876bbe094 (diff)
amd64: remove dead code, combine shared code
Diffstat (limited to 'src/kernel/arch/amd64/boot.c')
-rw-r--r--src/kernel/arch/amd64/boot.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/kernel/arch/amd64/boot.c b/src/kernel/arch/amd64/boot.c
index 56cf8c8..e8f9a26 100644
--- a/src/kernel/arch/amd64/boot.c
+++ b/src/kernel/arch/amd64/boot.c
@@ -1,5 +1,3 @@
-#include <kernel/arch/generic.h>
-#include <kernel/arch/amd64/32/gdt.h>
#include <kernel/arch/amd64/ata.h>
#include <kernel/arch/amd64/boot.h>
#include <kernel/arch/amd64/driver/fsroot.h>
@@ -9,6 +7,7 @@
#include <kernel/arch/amd64/interrupts/irq.h>
#include <kernel/arch/amd64/multiboot.h>
#include <kernel/arch/amd64/tty/tty.h>
+#include <kernel/arch/generic.h>
#include <kernel/main.h>
#include <kernel/mem/alloc.h>
#include <kernel/panic.h>
@@ -16,9 +15,8 @@
static void find_init(struct multiboot_info *multiboot, struct kmain_info *info)
{
struct multiboot_mod *module = (void*)(long)multiboot->mods;
- kprintf("mods count 0x%x", multiboot->mods_count);
- if (multiboot->mods_count < 1) {
- kprintf("can't find init! ");
+ if (multiboot->mods_count != 1) {
+ kprintf("unexpected amount of multiboot modules\n");
panic_invalid_state();
}
info->init.at = (void*)(long)module->start;