forked from Imagelibrary/rtems
Statically initialize the trap table in start.S to jump to _SPARC_Bad_trap() for all unexpected traps. This enables a proper RTEMS fatal error handling right from the start. Do not rely on the stack and register settings which caused an unexpected trap. Use the ISR stack of the processor to do the fatal error handling. Save the full context which caused the trap. Fatal error handler may use it for error logging. Unify the _CPU_Exception_frame_print() implementations and move it to cpukit. Update #4459.
39 lines
790 B
C
39 lines
790 B
C
/* Installs the BSP pre-driver hook
|
|
*/
|
|
|
|
/*
|
|
* COPYRIGHT (c) 2011
|
|
* Aeroflex Gaisler
|
|
*
|
|
* The license and distribution terms for this file may be
|
|
* found in the file LICENSE in this distribution or at
|
|
* http://www.rtems.org/license/LICENSE.
|
|
*/
|
|
|
|
#include <bsp.h>
|
|
#include <bsp/bootcard.h>
|
|
#include <rtems/sysinit.h>
|
|
|
|
/*
|
|
* Called just before drivers are initialized. Is used to initialize shared
|
|
* interrupt handling.
|
|
*/
|
|
static void erc32_pre_driver_hook( void )
|
|
{
|
|
/* Initialize shared interrupt handling, must be done after IRQ
|
|
* controller has been found and initialized.
|
|
*/
|
|
BSP_shared_interrupt_init();
|
|
}
|
|
|
|
RTEMS_SYSINIT_ITEM(
|
|
erc32_pre_driver_hook,
|
|
RTEMS_SYSINIT_BSP_PRE_DRIVERS,
|
|
RTEMS_SYSINIT_ORDER_MIDDLE
|
|
);
|
|
|
|
void bsp_start(void)
|
|
{
|
|
/* Nothing to do */
|
|
}
|