diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-11-25 17:48:11 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-11-27 17:03:40 +0100 |
commit | 815994fd17c2f732aacaf273a1e476a62de5f4a6 (patch) | |
tree | 17fffb992fcf3e025462215ee3c7515919d2ced4 /cpukit/score/cpu/i386/cpu.c | |
parent | powerpc: Add CPU_Exception_frame (diff) | |
download | rtems-815994fd17c2f732aacaf273a1e476a62de5f4a6.tar.bz2 |
score: Add CPU_Exception_frame
Add CPU port type CPU_Exception_frame and function
_CPU_Exception_frame_print().
The CPU ports of avr, bfin, h8300, lm32, m32c, m32r, m68k, nios2, sh,
sparc64, and v850 use an empty default implementation of
_CPU_Exception_frame_print().
Add rtems_exception_frame and rtems_exception_frame_print().
Add RTEMS_FATAL_SOURCE_EXCEPTION for CPU exceptions. Use rtems_fatal()
with source RTEMS_FATAL_SOURCE_EXCEPTION in CPU ports of i386, powerpc,
and sparc for unexpected exceptions.
Add third parameter to RTEMS_BSP_CLEANUP_OPTIONS() which controls the
BSP_PRINT_EXCEPTION_CONTEXT define used in the default
bsp_fatal_extension().
Add test sptests/spfatal26.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/cpu/i386/cpu.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c index acd2768730..15ff3c7619 100644 --- a/cpukit/score/cpu/i386/cpu.c +++ b/cpukit/score/cpu/i386/cpu.c @@ -117,7 +117,7 @@ struct Frame_ { uintptr_t pc; }; -static void _defaultExcHandler (CPU_Exception_frame *ctx) +void _CPU_Exception_frame_print (const CPU_Exception_frame *ctx) { unsigned int faultAddr = 0; printk("----------------------------------------------------------\n"); @@ -148,7 +148,6 @@ static void _defaultExcHandler (CPU_Exception_frame *ctx) * because the eip points to the faulty instruction so... */ printk("Exception while executing ISR!!!. System locked\n"); - _CPU_Fatal_halt(faultAddr); } else { struct Frame_ *fp = (struct Frame_*)ctx->ebp; @@ -171,10 +170,17 @@ static void _defaultExcHandler (CPU_Exception_frame *ctx) printk(" ************ FAULTY THREAD WILL BE SUSPENDED **************\n"); rtems_task_suspend(_Thread_Executing->Object.id); #endif - bsp_reset(); } } +static void _defaultExcHandler (CPU_Exception_frame *ctx) +{ + rtems_fatal( + RTEMS_FATAL_SOURCE_EXCEPTION, + (rtems_fatal_code) ctx + ); +} + cpuExcHandlerType _currentExcHandler = _defaultExcHandler; extern void rtems_exception_prologue_0(void); |