Requires mini.
Copyright (C) 2008 Segher Boessenkool <segher@kernel.crashing.org>
+Copyright (C) 2009 Bernhard Urban <lewurm@gmx.net>
+Copyright (C) 2009 Sebastian Falbesoner <sebastian.falbesoner@gmail.com>
# This code is licensed to you under the terms of the GNU GPL, version 2;
# see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
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)