diff --git a/bsps/shared/start/bspfatal-default.c b/bsps/shared/start/bspfatal-default.c index 4e2b02773b..88fdf39e71 100644 --- a/bsps/shared/start/bspfatal-default.c +++ b/bsps/shared/start/bspfatal-default.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -59,6 +60,26 @@ void bsp_fatal_extension( rtems_interrupt_local_disable( level ); (void) level; + #if defined(RTEMS_SMP) + if ( + source == RTEMS_FATAL_SOURCE_SMP && + code == SMP_FATAL_SHUTDOWN_RESPONSE + ) { + /* + * If this processor is requested to shutdown, use the default idle + * thread body which may place us in a low-power state waiting for + * interrupts. + */ + _CPU_Thread_Idle_body( 0 ); + } + + /* + * Request other online processors to shutdown. This reduces the + * likelihood to get concurrent output to the kernel I/O device. + */ + _SMP_Request_shutdown(); + #endif + #if BSP_VERBOSE_FATAL_EXTENSION Thread_Control *executing; const char* TYPE = "*** FATAL ***";