Changeset f5d0285 in rtems


Ignore:
Timestamp:
Nov 22, 2012, 1:41:59 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
82eb2c4
Parents:
86d80f0
git-author:
Sebastian Huber <sebastian.huber@…> (11/22/12 13:41:59)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/22/12 15:35:06)
Message:

m68k/mrm332: Delete _Internal_error_Occurred()

Use custom bsp_fatal_extension() instead.

Location:
c/src/lib/libbsp/m68k/mrm332
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/mrm332/Makefile.am

    r86d80f0 rf5d0285  
    3131libbsp_a_SOURCES += startup/start_c.c ../../shared/bsplibc.c \
    3232    ../../shared/bsppost.c ../../shared/bspstart.c startup/bsppredriverhook.c \
    33     ../../shared/bspclean.c ../../shared/bootcard.c ../../shared/sbrk.c \
     33    ../../shared/bootcard.c ../../shared/sbrk.c \
    3434    ../../shared/setvec.c ../../shared/bsppretaskinghook.c \
    3535    ../../shared/bspgetworkarea.c ../../shared/gnatinstallhandler.c \
  • c/src/lib/libbsp/m68k/mrm332/misc/interr.c

    r86d80f0 rf5d0285  
    11/*
    2  *  Internal Error Handler
    3  *
    42 *  COPYRIGHT (c) 1989-1999.
    53 *  On-Line Applications Research Corporation (OAR).
     
    108 */
    119
    12 #include <rtems/system.h>
    13 #include <rtems/score/interr.h>
    14 #include <rtems/score/sysstate.h>
    15 #include <rtems/score/userext.h>
    16 
    17 /*PAGE
    18  *
    19  *  _Internal_error_Occurred
    20  *
    21  *  This routine will invoke the fatal error handler supplied by the user
    22  *  followed by the the default one provided by the executive.  The default
    23  *  error handler assumes no hardware is present to help inform the user
    24  *  of the problem.  Halt stores the error code in a known register,
    25  *  disables interrupts, and halts the CPU.  If the CPU does not have a
    26  *  halt instruction, it will loop to itself.
    27  *
    28  *  Input parameters:
    29  *    the_source  - what subsystem the error originated in
    30  *    is_internal - if the error was internally generated
    31  *    the_error   - fatal error status code
    32  *
    33  *  Output parameters:
    34  *    As much information as possible is stored in a CPU dependent fashion.
    35  *    See the CPU dependent code for more information.
    36  *
    37  *  NOTE: The the_error is not necessarily a directive status code.
    38  */
     10#include <bsp.h>
     11#include <bsp/bootcard.h>
     12#include <rtems/bspIo.h>
    3913
    4014/*
    4115 * Ugly hack.... _CPU_Fatal_halt() disonnects the bdm. Without this
    4216 * change, the_error is only known only to the cpu :).
    43  *
    44  * From "bsp.h" which is not yet available in the arch tree during
    45  * this phase of install. jsg
    4617 */
    47 void outbyte(char);
    4818
    4919#define RAW_PUTS(str) \
     
    6232  }
    6333
    64 void volatile _Internal_error_Occurred(
    65   Internal_errors_Source  the_source,
    66   bool                    is_internal,
    67   uint32_t                the_error
     34void bsp_fatal_extension(
     35  rtems_fatal_source source,
     36  bool is_internal,
     37  rtems_fatal_code the_error
    6838)
    6939{
    70 
    71   _Internal_errors_What_happened.the_source  = the_source;
    72   _Internal_errors_What_happened.is_internal = is_internal;
    73   _Internal_errors_What_happened.the_error   = the_error;
    74 
    75   _User_extensions_Fatal( the_source, is_internal, the_error );
    76 
    77   _System_state_Set( SYSTEM_STATE_FAILED );
    78 
    7940  /* try to print error message to outbyte */
    8041  RAW_PUTS("\r\nRTEMS: A fatal error has occured.\r\n");
     
    8748  outbyte( (char)(the_error & 0xff) );
    8849  RAW_PUTS(").\r\n");
     50}
    8951
    90   /* configure peripherals for a safe exit */
    91   bsp_cleanup(1);
    92 
    93   _CPU_Fatal_halt( the_error );
    94 
    95   /* will not return from this routine */
     52void bsp_cleanup( uint32_t status )
     53{
     54  rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
    9655}
Note: See TracChangeset for help on using the changeset viewer.