292,30 → 292,6 |
istate->r3, istate->r4, istate->r5, istate->r6); |
} |
|
/** Data abort exception handler. |
* |
* Determines whether the exception was caused by a breakpoint |
* instruction or a page fault. |
*/ |
static void data_abort_exception(int exc_no, istate_t *istate) |
{ |
uint32_t *instr_addr = (uint32_t *) istate->pc; |
uint32_t opcode = *instr_addr; |
|
if ((opcode & 0xfff000f0) == 0xe1200070) { |
/* Bkpt */ |
if (istate_from_uspace(istate)) { |
udebug_breakpoint_event(0); |
} else { |
panic("Unexpected BKPT instruction at 0x%x", |
istate->pc); |
} |
} else { |
/* Page fault */ |
data_abort(exc_no, istate); |
} |
} |
|
/** Interrupt Exception handler. |
* |
* Determines the sources of interrupt and calls their handlers. |
380,8 → 356,7 |
exc_register(EXC_IRQ, "interrupt", (iroutine) irq_exception); |
exc_register(EXC_PREFETCH_ABORT, "prefetch abort", |
(iroutine) prefetch_abort); |
exc_register(EXC_DATA_ABORT, "data abort", |
(iroutine) data_abort_exception); |
exc_register(EXC_DATA_ABORT, "data abort", (iroutine) data_abort); |
exc_register(EXC_SWI, "software interrupt", (iroutine) swi_exception); |
} |
|