aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/interrupts/isr.c
diff options
context:
space:
mode:
authorMarvin Borner2019-11-25 21:25:15 +0100
committerMarvin Borner2019-11-25 21:25:15 +0100
commitc5f8b04cdea44e5e5e0c208947b1f7ae44703a23 (patch)
tree73fdc32e686585d2e866ea4cb416421339d2c75b /src/kernel/interrupts/isr.c
parentbb57b124d1bb385d41747f50be7dd4f3625539c1 (diff)
Debug, debug and even more debugging!
Diffstat (limited to 'src/kernel/interrupts/isr.c')
-rw-r--r--src/kernel/interrupts/isr.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/kernel/interrupts/isr.c b/src/kernel/interrupts/isr.c
index d511dda..8b42a24 100644
--- a/src/kernel/interrupts/isr.c
+++ b/src/kernel/interrupts/isr.c
@@ -156,7 +156,7 @@ const char *exception_messages[] = {
// Master exception/interrupt/fault handler - halt via panic
void fault_handler(struct regs *r)
{
- if (r->int_no < 32 && !(ignored_isr[r->int_no / 32] & (1 << (r->int_no % 32)))) {
+ if (r->int_no < 32) {
uint32_t faulting_address;
asm ("mov %%cr2, %0" : "=r" (faulting_address));
@@ -178,20 +178,11 @@ void fault_handler(struct regs *r)
serial_write_hex(r->err_code);
serial_write("\nInterrupt code: ");
serial_write_hex(r->int_no);
+ serial_write("\nInterrupt message: ");
+ serial_write(exception_messages[r->int_no]);
halt_loop(); // Idk loop?
char *message = (char *) exception_messages[r->int_no];
strcat(message, " Exception");
panic(message);
}
}
-
-
-void isr_ignore(uint8_t int_no)
-{
- ignored_isr[int_no / 32] |= 1 << (int_no % 32);
-}
-
-void isr_remember(uint8_t int_no)
-{
- ignored_isr[int_no / 32] &= ~(1 << (int_no % 32));
-}