X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=ppcskel.git;a=blobdiff_plain;f=exception.c;h=39a1654e6cfb6e77b1efbf6168b920670567aefd;hp=2d7451ecb8166db387559902ec6c43dc6c27b47e;hb=3a17a5742283d2510b6bdcf42dcb76cdb66d3770;hpb=cbb2f30692a3d5cb7817aaa95dc14f8db24f5adb diff --git a/exception.c b/exception.c index 2d7451e..39a1654 100644 --- a/exception.c +++ b/exception.c @@ -18,12 +18,10 @@ extern char exception_2200_start, exception_2200_end; 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 @@ -56,6 +54,9 @@ void exception_handler(int exception) for (;;) ; } + + irq_restore(cookie); + _CPU_ISR_Enable(); //wtf } void exception_init(void)