summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-11-28 21:45:06 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-11-28 21:45:06 +0000
commitc4cc81993a324a6416cb92f8c1b78ff501654dbf (patch)
tree190fbb3656e871c93f4d4fd5c8ff11a81262c0c5 /c/src/lib/libcpu/powerpc/old-exceptions/cpu.c
parent2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-c4cc81993a324a6416cb92f8c1b78ff501654dbf.tar.bz2
2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* mpc5xx/clock/clock.c, mpc5xx/timer/timer.c, mpc8260/clock/clock.c, mpc8260/cpm/brg.c, mpc8260/timer/timer.c, mpc8xx/clock/clock.c, mpc8xx/console-generic/console-generic.c, mpc8xx/timer/timer.c, new-exceptions/raw_exception.c, old-exceptions/cpu.c, ppc403/clock/clock.c, ppc403/console/console.c, ppc403/console/console.c.polled, ppc403/console/console405.c, ppc403/ictrl/ictrl.c, ppc403/irq/ictrl.c, ppc403/timer/timer.c, ppc403/tty_drv/tty_drv.c: Eliminate PowerPC specific elements from the CPU Table. They have been replaced with variables named bsp_XXX as needed.
Diffstat (limited to 'c/src/lib/libcpu/powerpc/old-exceptions/cpu.c')
-rw-r--r--c/src/lib/libcpu/powerpc/old-exceptions/cpu.c58
1 files changed, 31 insertions, 27 deletions
diff --git a/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c b/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c
index ed8d15280d..f6ffeae12a 100644
--- a/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c
+++ b/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c
@@ -18,7 +18,7 @@
*
* Derived from c/src/exec/cpu/no_cpu/cpu.c:
*
- * COPYRIGHT (c) 1989-1997.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be found in
@@ -111,11 +111,12 @@ void _CPU_Initialize_vectors(void)
{
int i;
proc_ptr handler = (proc_ptr)ppc_spurious;
+ extern void (*bsp_spurious_handler)(uint32_t vector, CPU_Interrupt_frame *);
_CPU_IRQ_info.Vector_table = _ISR_Vector_table;
- if ( _CPU_Table.spurious_handler )
- handler = (proc_ptr)_CPU_Table.spurious_handler;
+ if ( bsp_spurious_handler )
+ handler = (proc_ptr)bsp_spurious_handler;
for (i = 0; i < PPC_INTERRUPT_MAX; i++)
_ISR_Vector_table[i] = handler;
@@ -305,30 +306,33 @@ void _CPU_ISR_install_vector(
proc_ptr *old_handler
)
{
- proc_ptr ignored;
- *old_handler = _ISR_Vector_table[ vector ];
-
- /*
- * If the interrupt vector table is a table of pointer to isr entry
- * points, then we need to install the appropriate RTEMS interrupt
- * handler for this vector number.
- */
-
- /*
- * Install the wrapper so this ISR can be invoked properly.
- */
- if (_CPU_Table.exceptions_in_RAM)
- _CPU_ISR_install_raw_handler( vector, _ISR_Handler, &ignored );
-
- /*
- * We put the actual user ISR address in '_ISR_vector_table'. This will
- * be used by the _ISR_Handler so the user gets control.
- */
-
- _ISR_Vector_table[ vector ] = new_handler ? (ISR_Handler_entry)new_handler :
- _CPU_Table.spurious_handler ?
- (ISR_Handler_entry)_CPU_Table.spurious_handler :
- (ISR_Handler_entry)ppc_spurious;
+ proc_ptr ignored;
+ extern void (*bsp_spurious_handler)(uint32_t vector, CPU_Interrupt_frame *);
+ extern boolean bsp_exceptions_in_RAM;
+
+ *old_handler = _ISR_Vector_table[ vector ];
+
+ /*
+ * If the interrupt vector table is a table of pointer to isr entry
+ * points, then we need to install the appropriate RTEMS interrupt
+ * handler for this vector number.
+ */
+
+ /*
+ * Install the wrapper so this ISR can be invoked properly.
+ */
+ if (bsp_exceptions_in_RAM)
+ _CPU_ISR_install_raw_handler( vector, _ISR_Handler, &ignored );
+
+ /*
+ * We put the actual user ISR address in '_ISR_vector_table'. This will
+ * be used by the _ISR_Handler so the user gets control.
+ */
+
+ _ISR_Vector_table[ vector ] = new_handler ? (ISR_Handler_entry)new_handler :
+ bsp_spurious_handler ?
+ (ISR_Handler_entry)bsp_spurious_handler :
+ (ISR_Handler_entry)ppc_spurious;
}
/*PAGE