diff options
author | Marvin Borner | 2020-08-01 20:55:53 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-01 20:55:53 +0200 |
commit | b7f59b28b380d55f9e7abd8e450f1f9c7f050221 (patch) | |
tree | c6b89fa0ff2bebd5ed06a4384d766990bcb42c0a /src/drivers | |
parent | 1686173757af4e453e7a32d152ec4bd20d789652 (diff) |
Added syscalls
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/interrupts.asm | 1 | ||||
-rw-r--r-- | src/drivers/interrupts.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/drivers/interrupts.asm b/src/drivers/interrupts.asm index fd5dbfa..59c323c 100644 --- a/src/drivers/interrupts.asm +++ b/src/drivers/interrupts.asm @@ -109,6 +109,7 @@ ISR_NOERRCODE 28 ISR_NOERRCODE 29 ISR_NOERRCODE 30 ISR_NOERRCODE 31 +ISR_NOERRCODE 128 extern isr_handler isr_common_stub: diff --git a/src/drivers/interrupts.c b/src/drivers/interrupts.c index 1bd0b44..08f4c15 100644 --- a/src/drivers/interrupts.c +++ b/src/drivers/interrupts.c @@ -137,7 +137,8 @@ void isr_handler(struct regs *r) if (handler) { handler(r); } else if (r->int_no <= 32) { - printf("#%d Exception, halting!\n", r->int_no); + printf("\n#%d Exception, halting!\n", r->int_no); + printf("Error code: %d\n", r->err_code); __asm__("cli"); while (1) { }; @@ -181,6 +182,8 @@ void isr_install() idt_set_gate(29, (u32)isr29, 0x08, 0x8E); idt_set_gate(30, (u32)isr30, 0x08, 0x8E); idt_set_gate(31, (u32)isr31, 0x08, 0x8E); + + idt_set_gate(0x80, (u32)isr128, 0x08, 0x8E); } /** |