Beispiel #1
0
void bsp_fatal_extension(
  rtems_fatal_source source,
  bool always_set_to_false,
  rtems_fatal_code code
)
{
  #if (BSP_PRINT_EXCEPTION_CONTEXT)
    if ( source == RTEMS_FATAL_SOURCE_EXCEPTION ) {
      rtems_exception_frame_print( (const rtems_exception_frame *) code );
    }
  #endif

  #if (BSP_PRESS_KEY_FOR_RESET)
    printk( "\nFATAL ERROR - Executive shutdown! Any key to reboot..." );

    /*
     * Wait for a key to be pressed
     */
    while ( getchark() == -1 )
      ;

    printk("\n");
  #endif

  /*
   *  Check both conditions -- if you want to ask for reboot, then
   *  you must have meant to reset the board.
   */
  #if (BSP_PRESS_KEY_FOR_RESET) || (BSP_RESET_BOARD_AT_EXIT)
    bsp_reset();
  #endif
}
Beispiel #2
0
static void fatal_extension(
  rtems_fatal_source source,
  bool always_set_to_false,
  rtems_fatal_code code
)
{
  rtems_test_assert( source == RTEMS_FATAL_SOURCE_EXCEPTION );
  rtems_test_assert( !always_set_to_false );

  rtems_exception_frame_print( (const rtems_exception_frame *) code );

  TEST_END();
}
Beispiel #3
0
static void fatal_extension(
  rtems_fatal_source source,
  bool is_internal,
  rtems_fatal_code code
)
{
  rtems_test_assert( source == RTEMS_FATAL_SOURCE_EXCEPTION );
  rtems_test_assert( !is_internal );

  rtems_exception_frame_print( (const rtems_exception_frame *) code );

  rtems_test_endk();
}
Beispiel #4
0
void bsp_fatal_extension(
  rtems_fatal_source src,
  bool is_internal,
  rtems_fatal_code code
)
{
#ifdef RTEMS_SMP
  if (src == RTEMS_FATAL_SOURCE_SMP && code == SMP_FATAL_SHUTDOWN_RESPONSE) {
    while (true) {
      _ARM_Wait_for_event();
    }
  }
#endif

#if BSP_PRINT_EXCEPTION_CONTEXT
  if (src == RTEMS_FATAL_SOURCE_EXCEPTION) {
    rtems_exception_frame_print((const rtems_exception_frame *) code);
  }
#endif

#if BSP_RESET_BOARD_AT_EXIT
  bsp_reset();
#endif
}