From c4cc81993a324a6416cb92f8c1b78ff501654dbf Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 28 Nov 2007 21:45:06 +0000 Subject: 2007-11-28 Joel Sherrill * 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. --- c/src/lib/libcpu/powerpc/old-exceptions/cpu.c | 58 ++++++++++++++------------- 1 file changed, 31 insertions(+), 27 deletions(-) (limited to 'c/src/lib/libcpu/powerpc/old-exceptions/cpu.c') 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 -- cgit v1.2.3