diff --git a/Makefile b/Makefile index a175557..8b65e9b 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 = +VMFLAGS = -usb # Do not touch these. diff --git a/kernel/idt.c b/kernel/idt.c index 3f8f0dc..ef9937b 100644 --- a/kernel/idt.c +++ b/kernel/idt.c @@ -23,12 +23,12 @@ void exception_handler() { char* buf; - print("[E] ", INT_COLOR); + print("[exc] ", INT_COLOR); buf = itoa(debug, buf, 10); println(buf, 0x0f); - __asm__ __volatile__("cli; iret"); + __asm__ __volatile__("cli; hlt"); } void idt_set_desc(uint8 idx, void* isr, uint8 flags) { diff --git a/kernel/isr.asm b/kernel/isr.asm index 500c9b6..2bd44f0 100644 --- a/kernel/isr.asm +++ b/kernel/isr.asm @@ -10,20 +10,21 @@ isr_stub_%+%1: %macro isr_no_err_stub 1 isr_stub_%+%1: mov [isr_debug_ptr], byte %1 - call exception_handler + ;call exception_handler iret %endmacro extern exception_handler isr_no_err_stub 0 -isr_no_err_stub 1 +; TODO: make keeb drivers +isr_err_stub 1 ; keyboard : noerr isr_no_err_stub 2 isr_no_err_stub 3 isr_no_err_stub 4 isr_no_err_stub 5 isr_no_err_stub 6 isr_no_err_stub 7 -isr_err_stub 8 +isr_no_err_stub 8 ; err isr_no_err_stub 9 isr_err_stub 10 isr_err_stub 11