master
E. Almqvist 3 years ago
parent ab6fad5fb0
commit 507c8bdb2b
  1. 2
      Makefile
  2. 9
      kernel/idt.c
  3. 4
      kernel/isr.asm

@ -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.

@ -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");

@ -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

Loading…
Cancel
Save