From 507c8bdb2b7c4982c9f44f130eaedcd8aba338ca Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Tue, 19 Apr 2022 14:11:08 +0200 Subject: [PATCH] Cleanup --- Makefile | 2 +- kernel/idt.c | 9 --------- kernel/isr.asm | 4 ---- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 26ec844..505088b 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ LDFLAGS = -Wl,--oformat=binary -ffreestanding -nostdlib -shared -Ttext 0x1000 - # VM/Debug settings VM = qemu-system-x86_64 -VMFLAGS = -s -S -serial stdio -no-reboot -no-shutdown -d int +VMFLAGS = -serial stdio -no-reboot -no-shutdown -d int # Do not touch these. diff --git a/kernel/idt.c b/kernel/idt.c index b8f6ee9..a9bc235 100644 --- a/kernel/idt.c +++ b/kernel/idt.c @@ -26,15 +26,6 @@ void exception_handler() { print("[exc] ", EXC_COLOR); buf = itoa(debug, buf, 10); print(buf, 0x0c); - - if( debug == 13 ) { // General Protection Fault - uint* eip_ptr = 0xe223; - uint eip = *eip_ptr; - buf = itoa(eip, buf, 16); - print(" eax=", EXC_COLOR); - print(buf, 0x0e); - } - new_line(); __asm__ __volatile__("cli; hlt"); diff --git a/kernel/isr.asm b/kernel/isr.asm index 9cb4355..d6a5b6a 100644 --- a/kernel/isr.asm +++ b/kernel/isr.asm @@ -1,14 +1,10 @@ isr_debug_ptr equ 0xe222 -isr_eip_ptr equ 0xe223 %macro isr_err_stub 1 isr_stub_%+%1: ; Save exception vec mov [isr_debug_ptr], byte %1 - ; Save the instruction pointer - mov [isr_eip_ptr], dword eax - ; Handle the exception call exception_handler iret