From d192b15ee05b6d79c1503eb296fcab693a05dced Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 20 Sep 2021 20:32:58 +0200 Subject: create a few specialized panic()s thanks to this i can tell which ones are placeholders, and which ones should stay --- src/kernel/arch/i386/boot.c | 2 +- src/kernel/arch/i386/interrupts/isr.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/kernel/arch/i386') diff --git a/src/kernel/arch/i386/boot.c b/src/kernel/arch/i386/boot.c index 57f8ff5..94eefd6 100644 --- a/src/kernel/arch/i386/boot.c +++ b/src/kernel/arch/i386/boot.c @@ -19,7 +19,7 @@ void kmain_early(struct multiboot_info *multiboot) { struct multiboot_mod *module = &multiboot->mods[0]; if (multiboot->mods_count < 1) { tty_const("can't find init! "); - panic(); + panic_invalid_state(); // no init } info.init.at = module->start; info.init.size = module->end - module->start; diff --git a/src/kernel/arch/i386/interrupts/isr.c b/src/kernel/arch/i386/interrupts/isr.c index 86f697f..1ca6da9 100644 --- a/src/kernel/arch/i386/interrupts/isr.c +++ b/src/kernel/arch/i386/interrupts/isr.c @@ -4,7 +4,7 @@ #include #include -#define log_n_panic(x) {tty_const(x); panic();} +#define log_n_panic(x) {tty_const(x); panic_unimplemented();} // TODO kill the current process instead of panicking bool isr_test_interrupt_called = false; @@ -17,7 +17,7 @@ void isr_stage3(int interrupt) { tty_const("#PF at "); asm ("mov %%cr2, %0;" : "=r"(cr2) ::); _tty_var(cr2); - panic(); + panic_unimplemented(); } case 0x34: -- cgit v1.2.3