Changeset f82752a4 in rtems


Ignore:
Timestamp:
Jun 4, 2014, 9:23:34 AM (8 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, 5, master
Children:
e09f8b08
Parents:
12ab8d6
git-author:
Daniel Hellstrom <daniel@…> (06/04/14 09:23:34)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/10/14 12:06:08)
Message:

Let CPU/BSP Fatal handler have access to source

Without the source the error code does not say that much.
Let it be up to the CPU/BSP to determine the error code
reported on fatal shutdown.

This patch does not change the current behaviour, just
adds the option to handle the source of the fatal halt.

Location:
cpukit/score
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/arm/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    456456  } while (0)
    457457
    458 #define _CPU_Fatal_halt( _err )             \
     458#define _CPU_Fatal_halt( _source, _err )    \
    459459   do {                                     \
    460460     uint32_t _level;                       \
  • cpukit/score/cpu/avr/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    815815 */
    816816
    817 #define _CPU_Fatal_halt( _error ) \
     817#define _CPU_Fatal_halt( _source, _error ) \
    818818  { \
    819819  }
  • cpukit/score/cpu/bfin/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    913913 * XXX document implementation including references if appropriate
    914914 */
    915 #define _CPU_Fatal_halt( _error ) \
     915#define _CPU_Fatal_halt( _source, _error ) \
    916916  { \
    917917    __asm__ volatile ( "cli R1; \
  • cpukit/score/cpu/h8300/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    848848 */
    849849
    850 #define _CPU_Fatal_halt( _error ) \
    851         printk("Fatal Error %d Halted\n",_error); \
     850#define _CPU_Fatal_halt( _source, _error ) \
     851        printk("Fatal Error %d.%d Halted\n",_source, _error); \
    852852        for(;;)
    853853
  • cpukit/score/cpu/i386/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    526526 */
    527527
    528 #define _CPU_Fatal_halt( _error ) \
     528#define _CPU_Fatal_halt( _source, _error ) \
    529529  { \
    530530    uint32_t _error_lvalue = ( _error ); \
  • cpukit/score/cpu/lm32/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    916916 * XXX document implementation including references if appropriate
    917917 */
    918 #define _CPU_Fatal_halt( _error ) \
     918#define _CPU_Fatal_halt( _source, _error ) \
    919919  { \
    920920  }
  • cpukit/score/cpu/m32c/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    907907 * XXX document implementation including references if appropriate
    908908 */
    909 #define _CPU_Fatal_halt( _error ) \
     909#define _CPU_Fatal_halt( _source, _error ) \
    910910  { \
    911911  }
  • cpukit/score/cpu/m32r/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    925925 * XXX document implementation including references if appropriate
    926926 */
    927 #define _CPU_Fatal_halt( _error ) \
     927#define _CPU_Fatal_halt( _source, _error ) \
    928928  { \
    929929  }
  • cpukit/score/cpu/m68k/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    480480
    481481#if ( defined(__mcoldfire__) )
    482 #define _CPU_Fatal_halt( _error ) \
     482#define _CPU_Fatal_halt( _source, _error ) \
    483483  { __asm__ volatile( "move.w %%sr,%%d0\n\t" \
    484484                  "or.l %2,%%d0\n\t" \
     
    492492  }
    493493#else
    494 #define _CPU_Fatal_halt( _error ) \
     494#define _CPU_Fatal_halt( _source, _error ) \
    495495  { __asm__ volatile( "movl  %0,%%d0; " \
    496496                  "orw   #0x0700,%%sr; " \
  • cpukit/score/cpu/mips/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    914914 */
    915915
    916 #define _CPU_Fatal_halt( _error ) \
     916#define _CPU_Fatal_halt( _source, _error ) \
    917917  do { \
    918918    unsigned int _level; \
  • cpukit/score/cpu/moxie/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    734734 *  XXX
    735735 */
    736 #define _CPU_Fatal_halt( _error ) \
    737         printk("Fatal Error %d Halted\n",_error); \
     736#define _CPU_Fatal_halt( _source, _error ) \
     737        printk("Fatal Error %d.%d Halted\n",_source,_error); \
    738738        for(;;)
    739739
  • cpukit/score/cpu/nios2/nios2-fatal-halt.c

    r12ab8d6 rf82752a4  
    1515#include <rtems/score/nios2-utility.h>
    1616
    17 void _CPU_Fatal_halt( uint32_t _error )
     17void _CPU_Fatal_halt( uint32_t _source, uint32_t _error )
    1818{
    1919  /* write 0 to status register (disable interrupts) */
  • cpukit/score/cpu/nios2/nios2-iic-irq.c

    r12ab8d6 rf82752a4  
    134134void __Exception_Handler(CPU_Exception_frame *efr)
    135135{
    136   _CPU_Fatal_halt(0xECC0);
     136  _CPU_Fatal_halt(RTEMS_FATAL_SOURCE_EXCEPTION, 0xECC0); /* source ignored */
    137137}
  • cpukit/score/cpu/nios2/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    311311  _CPU_Context_restore( (_the_context) );
    312312
    313 void _CPU_Fatal_halt( uint32_t _error ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
     313void _CPU_Fatal_halt( uint32_t _source, uint32_t _error )
     314  RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
    314315
    315316/**
  • cpukit/score/cpu/no_cpu/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    10721072 * XXX document implementation including references if appropriate
    10731073 */
    1074 #define _CPU_Fatal_halt( _error ) \
     1074#define _CPU_Fatal_halt( _source, _error ) \
    10751075  { \
    10761076  }
  • cpukit/score/cpu/powerpc/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    678678#endif /* ASM */
    679679
    680 #define _CPU_Fatal_halt( _error ) \
     680#define _CPU_Fatal_halt( _source, _error ) \
    681681  _BSP_Fatal_error(_error)
    682682
  • cpukit/score/cpu/sh/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    676676  /* we manage the fatal error in the board support package */
    677677  void bsp_fatal_halt( uint32_t   _error);
    678 #define _CPU_Fatal_halt( _error ) bsp_fatal_halt( _error)
     678#define _CPU_Fatal_halt( _source, _error ) bsp_fatal_halt( _error)
    679679#else
    680 #define _CPU_Fatal_halt( _error)\
     680#define _CPU_Fatal_halt( _source, _error)\
    681681{ \
    682682  __asm__ volatile("mov.l %0,r0"::"m" (_error)); \
  • cpukit/score/cpu/sparc/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    10811081 * halts/stops the CPU.
    10821082 */
    1083 #define _CPU_Fatal_halt( _error ) \
     1083#define _CPU_Fatal_halt( _source, _error ) \
    10841084  do { \
    10851085    uint32_t   level; \
  • cpukit/score/cpu/sparc64/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    906906 */
    907907
    908 #define _CPU_Fatal_halt( _error ) \
     908#define _CPU_Fatal_halt( _source, _error ) \
    909909  do { \
    910910    uint32_t   level; \
  • cpukit/score/cpu/v850/rtems/score/cpu.h

    r12ab8d6 rf82752a4  
    872872 * Move the error code into r10, disable interrupts and halt.
    873873 */
    874 #define _CPU_Fatal_halt( _error ) \
     874#define _CPU_Fatal_halt( _source, _error ) \
    875875  do { \
    876876    __asm__ __volatile__ ( "di" ); \
  • cpukit/score/src/interr.c

    r12ab8d6 rf82752a4  
    5050  _System_state_Set( SYSTEM_STATE_TERMINATED );
    5151
    52   _CPU_Fatal_halt( the_error );
     52  _CPU_Fatal_halt( the_source, the_error );
    5353
    5454  /* will not return from this routine */
Note: See TracChangeset for help on using the changeset viewer.