X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=exception.c;h=f42b78be2da341bf1f7eeef5aa477967bc82394b;hb=1a108a707f13f51161f1bba4723be7a990d92f3e;hp=2d7451ecb8166db387559902ec6c43dc6c27b47e;hpb=cbb2f30692a3d5cb7817aaa95dc14f8db24f5adb;p=ppcskel.git diff --git a/exception.c b/exception.c index 2d7451e..f42b78b 100644 --- a/exception.c +++ b/exception.c @@ -3,6 +3,8 @@ Requires mini. Copyright (C) 2008 Segher Boessenkool +Copyright (C) 2009 Bernhard Urban +Copyright (C) 2009 Sebastian Falbesoner # 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 @@ -18,17 +20,15 @@ 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 else if (exception == 0x900) { - printf("\nDecrementer exception occured - who cares?\n"); + //printf("\nDecrementer exception occured - who cares?\n"); } else { @@ -56,6 +56,8 @@ void exception_handler(int exception) for (;;) ; } + + irq_restore(cookie); } void exception_init(void)