void exception_handler(int exception)
{
+ u32 cookie = irq_kill();
// check if the exception was actually an external interrupt
if (exception == 0x500) {
- u32 cookie = irq_kill();
irq_handler();
- irq_restore(cookie);
- //_CPU_ISR_Enable(); //wtf
}
// check if exception happened due to the decrementer
else if (exception == 0x900) {
- printf("\nDecrementer exception occured - who cares?\n");
+ //printf("\nDecrementer exception occured - who cares?\n");
}
else {
for (;;)
;
}
+
+ irq_restore(cookie);
}
void exception_init(void)