summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/mips/shared/irq/vectorexceptions.c
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@OARcorp.com>2012-04-04 08:39:46 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2012-04-04 08:43:08 -0500
commit0c0181dee26d64835f0cd4f47ef81f681ea553e8 (patch)
tree2f8aef096fa1ed345176328b805d9bb8394fd2f8 /c/src/lib/libbsp/mips/shared/irq/vectorexceptions.c
parentbsp/mpc55xx: Add and use chip features (diff)
downloadrtems-0c0181dee26d64835f0cd4f47ef81f681ea553e8.tar.bz2
PR 1993 - Convert MIPS to PIC IRQ model
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/mips/shared/irq/vectorexceptions.c (renamed from c/src/lib/libcpu/mips/shared/interrupts/vectorexceptions.c)42
1 files changed, 16 insertions, 26 deletions
diff --git a/c/src/lib/libcpu/mips/shared/interrupts/vectorexceptions.c b/c/src/lib/libbsp/mips/shared/irq/vectorexceptions.c
index 483f86f511..475527e941 100644
--- a/c/src/lib/libcpu/mips/shared/interrupts/vectorexceptions.c
+++ b/c/src/lib/libbsp/mips/shared/irq/vectorexceptions.c
@@ -1,9 +1,20 @@
-/*
+/**
+ * @file
+ *
* Common Code for Vectoring MIPS Exceptions
*
* The actual decoding of the cause register and vector number assignment
* is CPU model specific.
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2012.
+ * On-Line Applications Research Corporation (OAR).
*
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
* $Id$
*/
@@ -13,6 +24,9 @@
#include <rtems/mips/iregdef.h>
#include <rtems/mips/idtcpu.h>
#include <rtems/bspIo.h>
+#include <bsp/irq-generic.h>
+
+void mips_vector_exceptions( CPU_Interrupt_frame *frame );
static const char *cause_strings[32] =
{
@@ -87,30 +101,6 @@ static void mips_dump_exception_frame( CPU_Interrupt_frame *frame )
printk( "\n" );
}
-static void mips_default_exception_code_handler( int exc, CPU_Interrupt_frame *frame )
-{
- uint32_t sr;
- uint32_t cause;
-
- mips_get_sr( sr );
- mips_get_cause( cause );
-
- printk( "Unhandled exception %d\n", exc );
- printk( "sr: 0x%08x cause: 0x%08x --> %s\n", sr, cause,
- cause_strings[(cause >> 2) &0x1f] );
- mips_dump_exception_frame( frame );
-
- rtems_fatal_error_occurred(1);
-}
-
-#define CALL_EXC(_vector,_frame) \
- do { \
- if ( _ISR_Vector_table[_vector] ) \
- (_ISR_Vector_table[_vector])(_vector,_frame); \
- else \
- mips_default_exception_code_handler( _vector, _frame ); \
- } while(0)
-
/*
* There are constants defined for these but they should basically
* all be close to the same set.
@@ -124,5 +114,5 @@ void mips_vector_exceptions( CPU_Interrupt_frame *frame )
mips_get_cause( cause );
exc = (cause >> 2) & 0x1f;
- CALL_EXC( exc, frame );
+ bsp_interrupt_handler_dispatch( exc );
}