From a052181ca2e243540342315cde990b9471331a8e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 14 Nov 2012 09:59:10 +0100 Subject: score: Add RTEMS_FATAL_SOURCE_EXIT Include in all BSPs. Call rtems_fatal() with RTEMS_FATAL_SOURCE_EXIT as source and the exit() status code as fatal code in every bsp_cleanup(). Move previous bsp_cleanup() code into bsp_fatal_extension(). --- c/src/lib/libbsp/powerpc/beatnik/include/bsp.h | 1 + c/src/lib/libbsp/powerpc/beatnik/startup/bspclean.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'c/src/lib/libbsp/powerpc/beatnik') diff --git a/c/src/lib/libbsp/powerpc/beatnik/include/bsp.h b/c/src/lib/libbsp/powerpc/beatnik/include/bsp.h index 32fd3b47ca..a7f312dced 100644 --- a/c/src/lib/libbsp/powerpc/beatnik/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/beatnik/include/bsp.h @@ -15,6 +15,7 @@ #define LIBBSP_BEATNIK_BSP_H #include +#include #include #include diff --git a/c/src/lib/libbsp/powerpc/beatnik/startup/bspclean.c b/c/src/lib/libbsp/powerpc/beatnik/startup/bspclean.c index 1b63003e1c..1539e44cf5 100644 --- a/c/src/lib/libbsp/powerpc/beatnik/startup/bspclean.c +++ b/c/src/lib/libbsp/powerpc/beatnik/startup/bspclean.c @@ -2,16 +2,25 @@ #include #include -void bsp_cleanup( - uint32_t status +void bsp_fatal_extension( + rtems_fatal_source source, + bool is_internal, + rtems_fatal_code error ) { /* We can't go back to MotLoad since we blew it's memory area * and vectors. Just pull the reset line... */ printk( - "bsp_cleanup(): RTEMS terminated -- no way back to MotLoad " + "bsp_fatal_extension(): RTEMS terminated -- no way back to MotLoad " "so I reset the card\n" ); bsp_reset(); } + +void bsp_cleanup( + uint32_t status +) +{ + rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status ); +} -- cgit v1.2.3