[PATCH 10/16] score: Add RTEMS_FATAL_SOURCE_EXIT
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Nov 14 15:47:04 UTC 2012
Include <bsp/default-initial-extension.h> 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/arm/csb336/include/bsp.h | 1 +
c/src/lib/libbsp/arm/csb337/include/bsp.h | 1 +
c/src/lib/libbsp/arm/edb7312/include/bsp.h | 1 +
c/src/lib/libbsp/arm/gba/include/bsp.h | 1 +
c/src/lib/libbsp/arm/gdbarmsim/include/bsp.h | 1 +
c/src/lib/libbsp/arm/gp32/include/bsp.h | 1 +
c/src/lib/libbsp/arm/gumstix/include/bsp.h | 1 +
c/src/lib/libbsp/arm/lm3s69xx/include/bsp.h | 20 ++++++++-------
c/src/lib/libbsp/arm/lpc24xx/include/bsp.h | 22 +++++++++--------
c/src/lib/libbsp/arm/lpc32xx/include/bsp.h | 13 +++++----
c/src/lib/libbsp/arm/nds/include/bsp.h | 1 +
c/src/lib/libbsp/arm/rtl22xx/include/bsp.h | 1 +
c/src/lib/libbsp/arm/smdk2410/include/bsp.h | 1 +
c/src/lib/libbsp/arm/stm32f4/include/bsp.h | 1 +
c/src/lib/libbsp/avr/avrtest/include/bsp.h | 1 +
c/src/lib/libbsp/bfin/TLL6527M/include/bsp.h | 1 +
c/src/lib/libbsp/bfin/bf537Stamp/include/bsp.h | 1 +
c/src/lib/libbsp/bfin/eZKit533/include/bsp.h | 1 +
c/src/lib/libbsp/h8300/h8sim/include/bsp.h | 1 +
c/src/lib/libbsp/i386/pc386/include/bsp.h | 1 +
c/src/lib/libbsp/lm32/lm32_evr/include/bsp.h | 1 +
c/src/lib/libbsp/lm32/milkymist/include/bsp.h | 1 +
c/src/lib/libbsp/lm32/milkymist/startup/bspclean.c | 13 ++++++++-
c/src/lib/libbsp/m32c/m32cbsp/include/bsp.h | 1 +
c/src/lib/libbsp/m32r/m32rsim/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/av5282/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/csb360/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/gen68302/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/gen68340/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/gen68360/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/genmcf548x/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/idp/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/mcf5206elite/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/mcf52235/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/mcf5225x/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/mcf5225x/startup/bspclean.c | 15 ++++++++----
c/src/lib/libbsp/m68k/mcf5235/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/mcf5329/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/mrm332/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/mvme136/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/mvme136/startup/bspclean.c | 13 ++++++++-
c/src/lib/libbsp/m68k/mvme147/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/mvme147/startup/bspclean.c | 13 ++++++++-
c/src/lib/libbsp/m68k/mvme147s/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/mvme162/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/mvme162/startup/bspclean.c | 13 ++++++++-
c/src/lib/libbsp/m68k/mvme167/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c | 13 ++++++++-
c/src/lib/libbsp/m68k/ods68302/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/sim68000/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/uC5282/include/bsp.h | 1 +
c/src/lib/libbsp/m68k/uC5282/startup/bspclean.c | 11 ++++++++-
c/src/lib/libbsp/mips/csb350/include/bsp.h | 1 +
c/src/lib/libbsp/mips/genmongoosev/include/bsp.h | 1 +
c/src/lib/libbsp/mips/hurricane/include/bsp.h | 1 +
c/src/lib/libbsp/mips/jmr3904/include/bsp.h | 1 +
c/src/lib/libbsp/mips/malta/include/bsp.h | 1 +
c/src/lib/libbsp/mips/rbtx4925/include/bsp.h | 1 +
c/src/lib/libbsp/mips/rbtx4938/include/bsp.h | 1 +
c/src/lib/libbsp/nios2/nios2_iss/include/bsp.h | 1 +
c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h | 1 +
c/src/lib/libbsp/powerpc/beatnik/include/bsp.h | 1 +
.../lib/libbsp/powerpc/beatnik/startup/bspclean.c | 15 +++++++++--
c/src/lib/libbsp/powerpc/ep1a/include/bsp.h | 1 +
c/src/lib/libbsp/powerpc/gen5200/include/bsp.h | 1 +
c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h | 9 ++++---
c/src/lib/libbsp/powerpc/haleakala/include/bsp.h | 1 +
c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h | 1 +
.../libbsp/powerpc/motorola_powerpc/include/bsp.h | 1 +
c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h | 25 +++++++++----------
c/src/lib/libbsp/powerpc/mpc8260ads/include/bsp.h | 1 +
c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h | 1 +
c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h | 1 +
.../lib/libbsp/powerpc/mvme5500/startup/bspclean.c | 13 ++++++++-
c/src/lib/libbsp/powerpc/psim/include/bsp.h | 1 +
c/src/lib/libbsp/powerpc/qemuppc/include/bsp.h | 1 +
c/src/lib/libbsp/powerpc/qoriq/include/bsp.h | 6 +++-
c/src/lib/libbsp/powerpc/score603e/include/bsp.h | 1 +
c/src/lib/libbsp/powerpc/ss555/include/bsp.h | 1 +
c/src/lib/libbsp/powerpc/t32mppc/include/bsp.h | 2 +
c/src/lib/libbsp/powerpc/tqm8xx/include/bsp.h | 8 ++++--
c/src/lib/libbsp/powerpc/virtex/include/bsp.h | 1 +
c/src/lib/libbsp/powerpc/virtex4/include/bsp.h | 2 +
.../lib/libbsp/powerpc/virtex4/startup/bspclean.c | 15 ++++++++++-
c/src/lib/libbsp/powerpc/virtex5/include/bsp.h | 1 +
.../lib/libbsp/powerpc/virtex5/startup/bspclean.c | 15 ++++++++++-
c/src/lib/libbsp/sh/gensh1/include/bsp.h | 1 +
c/src/lib/libbsp/sh/gensh2/include/bsp.h | 1 +
c/src/lib/libbsp/sh/gensh4/include/bsp.h | 1 +
c/src/lib/libbsp/sh/shsim/include/bsp.h | 1 +
c/src/lib/libbsp/shared/bspclean.c | 11 +++++++-
c/src/lib/libbsp/sparc/erc32/Makefile.am | 1 -
c/src/lib/libbsp/sparc/erc32/include/bsp.h | 5 ++-
c/src/lib/libbsp/sparc/leon2/Makefile.am | 1 -
c/src/lib/libbsp/sparc/leon2/include/bsp.h | 5 ++-
c/src/lib/libbsp/sparc/leon3/Makefile.am | 1 -
c/src/lib/libbsp/sparc/leon3/include/bsp.h | 5 ++-
c/src/lib/libbsp/sparc64/niagara/include/bsp.h | 1 +
c/src/lib/libbsp/sparc64/usiii/include/bsp.h | 1 +
c/src/lib/libbsp/v850/gdbv850sim/include/bsp.h | 1 +
cpukit/score/include/rtems/score/interr.h | 7 +++++
101 files changed, 282 insertions(+), 83 deletions(-)
diff --git a/c/src/lib/libbsp/arm/csb336/include/bsp.h b/c/src/lib/libbsp/arm/csb336/include/bsp.h
index 906a1ef..f68b0e3 100644
--- a/c/src/lib/libbsp/arm/csb336/include/bsp.h
+++ b/c/src/lib/libbsp/arm/csb336/include/bsp.h
@@ -16,6 +16,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/arm/csb337/include/bsp.h b/c/src/lib/libbsp/arm/csb337/include/bsp.h
index 1a07bdf..712f1d0 100644
--- a/c/src/lib/libbsp/arm/csb337/include/bsp.h
+++ b/c/src/lib/libbsp/arm/csb337/include/bsp.h
@@ -16,6 +16,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/arm/edb7312/include/bsp.h b/c/src/lib/libbsp/arm/edb7312/include/bsp.h
index 7c3dfd1..13e11f2 100644
--- a/c/src/lib/libbsp/arm/edb7312/include/bsp.h
+++ b/c/src/lib/libbsp/arm/edb7312/include/bsp.h
@@ -15,6 +15,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/arm/gba/include/bsp.h b/c/src/lib/libbsp/arm/gba/include/bsp.h
index bd2fb6d..0bc3093 100644
--- a/c/src/lib/libbsp/arm/gba/include/bsp.h
+++ b/c/src/lib/libbsp/arm/gba/include/bsp.h
@@ -22,6 +22,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/arm/gdbarmsim/include/bsp.h b/c/src/lib/libbsp/arm/gdbarmsim/include/bsp.h
index 2d7c9f3..2a7917c 100644
--- a/c/src/lib/libbsp/arm/gdbarmsim/include/bsp.h
+++ b/c/src/lib/libbsp/arm/gdbarmsim/include/bsp.h
@@ -15,6 +15,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/arm/gp32/include/bsp.h b/c/src/lib/libbsp/arm/gp32/include/bsp.h
index 273f190..be542e9 100644
--- a/c/src/lib/libbsp/arm/gp32/include/bsp.h
+++ b/c/src/lib/libbsp/arm/gp32/include/bsp.h
@@ -21,6 +21,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/arm/gumstix/include/bsp.h b/c/src/lib/libbsp/arm/gumstix/include/bsp.h
index e9358fe..6e18ad4 100644
--- a/c/src/lib/libbsp/arm/gumstix/include/bsp.h
+++ b/c/src/lib/libbsp/arm/gumstix/include/bsp.h
@@ -14,6 +14,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/arm/lm3s69xx/include/bsp.h b/c/src/lib/libbsp/arm/lm3s69xx/include/bsp.h
index ed00487..789b88f 100644
--- a/c/src/lib/libbsp/arm/lm3s69xx/include/bsp.h
+++ b/c/src/lib/libbsp/arm/lm3s69xx/include/bsp.h
@@ -17,14 +17,6 @@
#include <bspopts.h>
-#include <rtems.h>
-#include <rtems/console.h>
-#include <rtems/clockdrv.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
#define BSP_FEATURE_IRQ_EXTENSION
#define BSP_ARMV7M_IRQ_PRIORITY_DEFAULT (5 << 5)
@@ -33,10 +25,20 @@ extern "C" {
#ifndef ASM
-#endif /* ASM */
+#include <bsp/default-initial-extension.h>
+
+#include <rtems.h>
+#include <rtems/console.h>
+#include <rtems/clockdrv.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
#ifdef __cplusplus
}
#endif /* __cplusplus */
+#endif /* ASM */
+
#endif /* LIBBSP_ARM_LM3S69XX_BSP_H */
diff --git a/c/src/lib/libbsp/arm/lpc24xx/include/bsp.h b/c/src/lib/libbsp/arm/lpc24xx/include/bsp.h
index 79fc077..210f2ab 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/include/bsp.h
+++ b/c/src/lib/libbsp/arm/lpc24xx/include/bsp.h
@@ -25,14 +25,6 @@
#include <bspopts.h>
-#include <rtems.h>
-#include <rtems/console.h>
-#include <rtems/clockdrv.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
#define BSP_FEATURE_IRQ_EXTENSION
#define LPC24XX_PCLK (LPC24XX_CCLK / LPC24XX_PCLKDIV)
@@ -49,6 +41,16 @@ extern "C" {
#ifndef ASM
+#include <rtems.h>
+#include <rtems/console.h>
+#include <rtems/clockdrv.h>
+
+#include <bsp/default-initial-extension.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
struct rtems_bsdnet_ifconfig;
/**
@@ -111,10 +113,10 @@ void bsp_restart(void *addr);
/** @} */
-#endif /* ASM */
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
+#endif /* ASM */
+
#endif /* LIBBSP_ARM_LPC24XX_BSP_H */
diff --git a/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h b/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h
index 43e0d90..5d9d18a 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h
+++ b/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h
@@ -25,20 +25,21 @@
#include <bspopts.h>
+#define BSP_FEATURE_IRQ_EXTENSION
+
+#ifndef ASM
+
#include <rtems.h>
#include <rtems/console.h>
#include <rtems/clockdrv.h>
#include <bsp/lpc32xx.h>
+#include <bsp/default-initial-extension.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#define BSP_FEATURE_IRQ_EXTENSION
-
-#ifndef ASM
-
struct rtems_bsdnet_ifconfig;
/**
@@ -247,10 +248,10 @@ extern uint32_t lpc32xx_magic_zero_size [];
* @brief LPC support package.
*/
-#endif /* ASM */
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
+#endif /* ASM */
+
#endif /* LIBBSP_ARM_LPC32XX_BSP_H */
diff --git a/c/src/lib/libbsp/arm/nds/include/bsp.h b/c/src/lib/libbsp/arm/nds/include/bsp.h
index cb30664..3565841 100644
--- a/c/src/lib/libbsp/arm/nds/include/bsp.h
+++ b/c/src/lib/libbsp/arm/nds/include/bsp.h
@@ -16,6 +16,7 @@ extern "C"
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
#include <rtems/bspIo.h>
diff --git a/c/src/lib/libbsp/arm/rtl22xx/include/bsp.h b/c/src/lib/libbsp/arm/rtl22xx/include/bsp.h
index 79fa99b..936f93a 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/include/bsp.h
+++ b/c/src/lib/libbsp/arm/rtl22xx/include/bsp.h
@@ -15,6 +15,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#define BSP_SMALL_MEMORY 1
diff --git a/c/src/lib/libbsp/arm/smdk2410/include/bsp.h b/c/src/lib/libbsp/arm/smdk2410/include/bsp.h
index d569f55..5dae367 100644
--- a/c/src/lib/libbsp/arm/smdk2410/include/bsp.h
+++ b/c/src/lib/libbsp/arm/smdk2410/include/bsp.h
@@ -13,6 +13,7 @@
#define _BSP_H
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#ifdef __cplusplus
extern "C" {
diff --git a/c/src/lib/libbsp/arm/stm32f4/include/bsp.h b/c/src/lib/libbsp/arm/stm32f4/include/bsp.h
index e2c1ae4..6b77a87 100644
--- a/c/src/lib/libbsp/arm/stm32f4/include/bsp.h
+++ b/c/src/lib/libbsp/arm/stm32f4/include/bsp.h
@@ -16,6 +16,7 @@
#define LIBBSP_ARM_STM32F4_BSP_H
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/avr/avrtest/include/bsp.h b/c/src/lib/libbsp/avr/avrtest/include/bsp.h
index f46194f..bd08e10 100644
--- a/c/src/lib/libbsp/avr/avrtest/include/bsp.h
+++ b/c/src/lib/libbsp/avr/avrtest/include/bsp.h
@@ -19,6 +19,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/bfin/TLL6527M/include/bsp.h b/c/src/lib/libbsp/bfin/TLL6527M/include/bsp.h
index c4a28c5..4314743 100644
--- a/c/src/lib/libbsp/bfin/TLL6527M/include/bsp.h
+++ b/c/src/lib/libbsp/bfin/TLL6527M/include/bsp.h
@@ -20,6 +20,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/bfin/bf537Stamp/include/bsp.h b/c/src/lib/libbsp/bfin/bf537Stamp/include/bsp.h
index 9d96bb8..44a2d79 100644
--- a/c/src/lib/libbsp/bfin/bf537Stamp/include/bsp.h
+++ b/c/src/lib/libbsp/bfin/bf537Stamp/include/bsp.h
@@ -20,6 +20,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/bfin/eZKit533/include/bsp.h b/c/src/lib/libbsp/bfin/eZKit533/include/bsp.h
index e4dc27e..3840ed5 100644
--- a/c/src/lib/libbsp/bfin/eZKit533/include/bsp.h
+++ b/c/src/lib/libbsp/bfin/eZKit533/include/bsp.h
@@ -22,6 +22,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/h8300/h8sim/include/bsp.h b/c/src/lib/libbsp/h8300/h8sim/include/bsp.h
index ce13629..c2ad183 100644
--- a/c/src/lib/libbsp/h8300/h8sim/include/bsp.h
+++ b/c/src/lib/libbsp/h8300/h8sim/include/bsp.h
@@ -19,6 +19,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/i386/pc386/include/bsp.h b/c/src/lib/libbsp/i386/pc386/include/bsp.h
index 5af9dd1..5e6dcc6 100644
--- a/c/src/lib/libbsp/i386/pc386/include/bsp.h
+++ b/c/src/lib/libbsp/i386/pc386/include/bsp.h
@@ -44,6 +44,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/lm32/lm32_evr/include/bsp.h b/c/src/lib/libbsp/lm32/lm32_evr/include/bsp.h
index d13d42f..db66c4f 100644
--- a/c/src/lib/libbsp/lm32/lm32_evr/include/bsp.h
+++ b/c/src/lib/libbsp/lm32/lm32_evr/include/bsp.h
@@ -20,6 +20,7 @@
#include <stdint.h>
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/lm32/milkymist/include/bsp.h b/c/src/lib/libbsp/lm32/milkymist/include/bsp.h
index 5dd2cb0..99fba5d 100644
--- a/c/src/lib/libbsp/lm32/milkymist/include/bsp.h
+++ b/c/src/lib/libbsp/lm32/milkymist/include/bsp.h
@@ -14,6 +14,7 @@
#include <stdint.h>
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/lm32/milkymist/startup/bspclean.c b/c/src/lib/libbsp/lm32/milkymist/startup/bspclean.c
index 75e29ae..ddd2a7f 100644
--- a/c/src/lib/libbsp/lm32/milkymist/startup/bspclean.c
+++ b/c/src/lib/libbsp/lm32/milkymist/startup/bspclean.c
@@ -45,10 +45,19 @@ static void reconf(void)
icap_write(0, 0xffff); /* dummy word */
}
-void bsp_cleanup(uint32_t status)
+void bsp_fatal_extension(
+ rtems_fatal_source source,
+ bool is_internal,
+ rtems_fatal_code error
+)
{
- if (status)
+ if (source == RTEMS_FATAL_SOURCE_EXIT && status)
reconf();
else
reboot();
}
+
+void bsp_cleanup(uint32_t status)
+{
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
+}
diff --git a/c/src/lib/libbsp/m32c/m32cbsp/include/bsp.h b/c/src/lib/libbsp/m32c/m32cbsp/include/bsp.h
index ce13629..c2ad183 100644
--- a/c/src/lib/libbsp/m32c/m32cbsp/include/bsp.h
+++ b/c/src/lib/libbsp/m32c/m32cbsp/include/bsp.h
@@ -19,6 +19,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/m32r/m32rsim/include/bsp.h b/c/src/lib/libbsp/m32r/m32rsim/include/bsp.h
index 728ad98..708f100 100644
--- a/c/src/lib/libbsp/m32r/m32rsim/include/bsp.h
+++ b/c/src/lib/libbsp/m32r/m32rsim/include/bsp.h
@@ -19,6 +19,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/m68k/av5282/include/bsp.h b/c/src/lib/libbsp/m68k/av5282/include/bsp.h
index 75c289d..6af587a 100644
--- a/c/src/lib/libbsp/m68k/av5282/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/av5282/include/bsp.h
@@ -10,6 +10,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/m68k/csb360/include/bsp.h b/c/src/lib/libbsp/m68k/csb360/include/bsp.h
index 8f364dc..2e32a3d 100644
--- a/c/src/lib/libbsp/m68k/csb360/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/csb360/include/bsp.h
@@ -110,6 +110,7 @@ extern "C" {
#include <rtems/console.h>
#include <rtems/iosupp.h>
#include <rtems/clockdrv.h>
+#include <bsp/default-initial-extension.h>
struct rtems_bsdnet_ifconfig;
extern int rtems_enet_driver_attach (struct rtems_bsdnet_ifconfig *config);
diff --git a/c/src/lib/libbsp/m68k/gen68302/include/bsp.h b/c/src/lib/libbsp/m68k/gen68302/include/bsp.h
index 6b3b397..4fdb60c 100644
--- a/c/src/lib/libbsp/m68k/gen68302/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/gen68302/include/bsp.h
@@ -20,6 +20,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/m68k/gen68340/include/bsp.h b/c/src/lib/libbsp/m68k/gen68340/include/bsp.h
index e8b2c98..bc5142c 100644
--- a/c/src/lib/libbsp/m68k/gen68340/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/gen68340/include/bsp.h
@@ -23,6 +23,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/m68k/gen68360/include/bsp.h b/c/src/lib/libbsp/m68k/gen68360/include/bsp.h
index 4de5a4f..383946f 100644
--- a/c/src/lib/libbsp/m68k/gen68360/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/gen68360/include/bsp.h
@@ -29,6 +29,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/m68k/genmcf548x/include/bsp.h b/c/src/lib/libbsp/m68k/genmcf548x/include/bsp.h
index dba6f5a..0379d69 100644
--- a/c/src/lib/libbsp/m68k/genmcf548x/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/genmcf548x/include/bsp.h
@@ -50,6 +50,7 @@
extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/m68k/idp/include/bsp.h b/c/src/lib/libbsp/m68k/idp/include/bsp.h
index 72795f9..599bf1f 100644
--- a/c/src/lib/libbsp/m68k/idp/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/idp/include/bsp.h
@@ -7,6 +7,7 @@
#define _BSP_H
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/include/bsp.h b/c/src/lib/libbsp/m68k/mcf5206elite/include/bsp.h
index 074e05c..f06444e 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/include/bsp.h
@@ -127,6 +127,7 @@ extern "C" {
#include <rtems/iosupp.h>
#include <rtems/clockdrv.h>
#include <rtems/rtc.h>
+#include <bsp/default-initial-extension.h>
#include "i2c.h"
diff --git a/c/src/lib/libbsp/m68k/mcf52235/include/bsp.h b/c/src/lib/libbsp/m68k/mcf52235/include/bsp.h
index 701e604..6bd6aa8 100644
--- a/c/src/lib/libbsp/m68k/mcf52235/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mcf52235/include/bsp.h
@@ -10,6 +10,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/m68k/mcf5225x/include/bsp.h b/c/src/lib/libbsp/m68k/mcf5225x/include/bsp.h
index 13a189f..2a419d7 100644
--- a/c/src/lib/libbsp/m68k/mcf5225x/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mcf5225x/include/bsp.h
@@ -12,6 +12,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/m68k/mcf5225x/startup/bspclean.c b/c/src/lib/libbsp/m68k/mcf5225x/startup/bspclean.c
index fb53890..e8c70c3 100644
--- a/c/src/lib/libbsp/m68k/mcf5225x/startup/bspclean.c
+++ b/c/src/lib/libbsp/m68k/mcf5225x/startup/bspclean.c
@@ -19,13 +19,18 @@
#include <bsp/bootcard.h>
#include <rtems/bspIo.h>
+void bsp_fatal_extension(
+ rtems_fatal_source source,
+ bool is_internal,
+ rtems_fatal_code error
+)
+{
+ printk("\nRTEMS exited!\n");
+}
+
void __attribute__((weak)) bsp_cleanup(
uint32_t status
)
{
- printk("\nRTEMS exited!\n");
- for (;;) {
- __asm__ volatile (" nop ");
- __asm__ volatile (" nop ");
- }
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
}
diff --git a/c/src/lib/libbsp/m68k/mcf5235/include/bsp.h b/c/src/lib/libbsp/m68k/mcf5235/include/bsp.h
index b822b8d..66d0c70 100644
--- a/c/src/lib/libbsp/m68k/mcf5235/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mcf5235/include/bsp.h
@@ -10,6 +10,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/m68k/mcf5329/include/bsp.h b/c/src/lib/libbsp/m68k/mcf5329/include/bsp.h
index 7a7db3b..719c5f9 100644
--- a/c/src/lib/libbsp/m68k/mcf5329/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mcf5329/include/bsp.h
@@ -10,6 +10,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/m68k/mrm332/include/bsp.h b/c/src/lib/libbsp/m68k/mrm332/include/bsp.h
index c792c36..ab5bf68 100644
--- a/c/src/lib/libbsp/m68k/mrm332/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mrm332/include/bsp.h
@@ -18,6 +18,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/bspIo.h>
diff --git a/c/src/lib/libbsp/m68k/mvme136/include/bsp.h b/c/src/lib/libbsp/m68k/mvme136/include/bsp.h
index 4b10ece..56c3216 100644
--- a/c/src/lib/libbsp/m68k/mvme136/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme136/include/bsp.h
@@ -18,6 +18,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/clockdrv.h>
diff --git a/c/src/lib/libbsp/m68k/mvme136/startup/bspclean.c b/c/src/lib/libbsp/m68k/mvme136/startup/bspclean.c
index 45966ff..50feb5a 100644
--- a/c/src/lib/libbsp/m68k/mvme136/startup/bspclean.c
+++ b/c/src/lib/libbsp/m68k/mvme136/startup/bspclean.c
@@ -30,8 +30,10 @@ void bsp_return_to_monitor_trap(void)
#define TIMER 0xfffb0000
-void bsp_cleanup(
- uint32_t status
+void bsp_fatal_extension(
+ rtems_fatal_source source,
+ bool is_internal,
+ rtems_fatal_code error
)
{
Z8x36_WRITE( TIMER, MASTER_INTR, 0x62 ); /* redo timer */
@@ -42,3 +44,10 @@ void bsp_cleanup(
M68Kvec[ 45 ] = bsp_return_to_monitor_trap; /* install handler */
__asm__ volatile( "trap #13" ); /* insures SUPV mode */
}
+
+void bsp_cleanup(
+ uint32_t status
+)
+{
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
+}
diff --git a/c/src/lib/libbsp/m68k/mvme147/include/bsp.h b/c/src/lib/libbsp/m68k/mvme147/include/bsp.h
index 51c8d59..5a074ee 100644
--- a/c/src/lib/libbsp/m68k/mvme147/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme147/include/bsp.h
@@ -22,6 +22,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/clockdrv.h>
diff --git a/c/src/lib/libbsp/m68k/mvme147/startup/bspclean.c b/c/src/lib/libbsp/m68k/mvme147/startup/bspclean.c
index 7f29f4e..405d926 100644
--- a/c/src/lib/libbsp/m68k/mvme147/startup/bspclean.c
+++ b/c/src/lib/libbsp/m68k/mvme147/startup/bspclean.c
@@ -31,8 +31,10 @@ void bsp_return_to_monitor_trap(void)
__asm__ volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
}
-void bsp_cleanup(
- uint32_t status
+void bsp_fatal_extension(
+ rtems_fatal_source source,
+ bool is_internal,
+ rtems_fatal_code error
)
{
pcc->timer1_int_control = 0; /* Disable Timer 1 */
@@ -41,3 +43,10 @@ void bsp_cleanup(
M68Kvec[ 45 ] = bsp_return_to_monitor_trap; /* install handler */
__asm__ volatile( "trap #13" ); /* ensures SUPV mode */
}
+
+void bsp_cleanup(
+ uint32_t status
+)
+{
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
+}
diff --git a/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h b/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h
index 1627457..9cdaaad 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h
@@ -22,6 +22,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/clockdrv.h>
diff --git a/c/src/lib/libbsp/m68k/mvme162/include/bsp.h b/c/src/lib/libbsp/m68k/mvme162/include/bsp.h
index ccbac9e..d74e60f 100644
--- a/c/src/lib/libbsp/m68k/mvme162/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme162/include/bsp.h
@@ -25,6 +25,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/clockdrv.h>
diff --git a/c/src/lib/libbsp/m68k/mvme162/startup/bspclean.c b/c/src/lib/libbsp/m68k/mvme162/startup/bspclean.c
index 7c25150..3b275d9 100644
--- a/c/src/lib/libbsp/m68k/mvme162/startup/bspclean.c
+++ b/c/src/lib/libbsp/m68k/mvme162/startup/bspclean.c
@@ -46,10 +46,19 @@ void bsp_return_to_monitor_trap(void)
#endif
}
-void bsp_cleanup(
- uint32_t status
+void bsp_fatal_extension(
+ rtems_fatal_source source,
+ bool is_internal,
+ rtems_fatal_code error
)
{
M68Kvec[ 45 ] = bsp_return_to_monitor_trap; /* install handler */
__asm__ volatile( "trap #13" ); /* insures SUPV mode */
}
+
+void bsp_cleanup(
+ uint32_t status
+)
+{
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
+}
diff --git a/c/src/lib/libbsp/m68k/mvme167/include/bsp.h b/c/src/lib/libbsp/m68k/mvme167/include/bsp.h
index 9a3324a..f2521e9 100644
--- a/c/src/lib/libbsp/m68k/mvme167/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme167/include/bsp.h
@@ -24,6 +24,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/clockdrv.h>
diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c b/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c
index 487ad35..68e127f 100644
--- a/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c
+++ b/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c
@@ -49,6 +49,16 @@ static void bsp_return_to_monitor_trap( void )
__asm__ volatile( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
}
+void bsp_fatal_extension(
+ rtems_fatal_source source,
+ bool is_internal,
+ rtems_fatal_code error
+)
+{
+ M68Kvec[ 45 ] = bsp_return_to_monitor_trap;
+ __asm__ volatile( "trap #13" );
+}
+
/*
* bsp_cleanup
*
@@ -76,6 +86,5 @@ void bsp_cleanup(
uint32_t status
)
{
- M68Kvec[ 45 ] = bsp_return_to_monitor_trap;
- __asm__ volatile( "trap #13" );
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
}
diff --git a/c/src/lib/libbsp/m68k/ods68302/include/bsp.h b/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
index 394c166..f7c37e7 100644
--- a/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
@@ -18,6 +18,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#define BSP_SMALL_MEMORY 1
#include <rtems.h>
diff --git a/c/src/lib/libbsp/m68k/sim68000/include/bsp.h b/c/src/lib/libbsp/m68k/sim68000/include/bsp.h
index aedbd4d..f4e45a6 100644
--- a/c/src/lib/libbsp/m68k/sim68000/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/sim68000/include/bsp.h
@@ -19,6 +19,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/m68k/uC5282/include/bsp.h b/c/src/lib/libbsp/m68k/uC5282/include/bsp.h
index f66022a..a7cced4 100644
--- a/c/src/lib/libbsp/m68k/uC5282/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/uC5282/include/bsp.h
@@ -19,6 +19,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/m68k/uC5282/startup/bspclean.c b/c/src/lib/libbsp/m68k/uC5282/startup/bspclean.c
index f9de975..dc17af7 100644
--- a/c/src/lib/libbsp/m68k/uC5282/startup/bspclean.c
+++ b/c/src/lib/libbsp/m68k/uC5282/startup/bspclean.c
@@ -16,9 +16,18 @@
#include <bsp.h>
#include <bsp/bootcard.h>
+void bsp_fatal_extension(
+ rtems_fatal_source source,
+ bool is_internal,
+ rtems_fatal_code error
+)
+{
+ bsp_reset();
+}
+
void bsp_cleanup(
uint32_t status
)
{
- bsp_reset();
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
}
diff --git a/c/src/lib/libbsp/mips/csb350/include/bsp.h b/c/src/lib/libbsp/mips/csb350/include/bsp.h
index 34353b2..1d86856 100644
--- a/c/src/lib/libbsp/mips/csb350/include/bsp.h
+++ b/c/src/lib/libbsp/mips/csb350/include/bsp.h
@@ -22,6 +22,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/mips/genmongoosev/include/bsp.h b/c/src/lib/libbsp/mips/genmongoosev/include/bsp.h
index 3d4a28a..8809b1b 100644
--- a/c/src/lib/libbsp/mips/genmongoosev/include/bsp.h
+++ b/c/src/lib/libbsp/mips/genmongoosev/include/bsp.h
@@ -22,6 +22,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/mips/hurricane/include/bsp.h b/c/src/lib/libbsp/mips/hurricane/include/bsp.h
index a7ae7d5..6927efa 100644
--- a/c/src/lib/libbsp/mips/hurricane/include/bsp.h
+++ b/c/src/lib/libbsp/mips/hurricane/include/bsp.h
@@ -20,6 +20,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/mips/jmr3904/include/bsp.h b/c/src/lib/libbsp/mips/jmr3904/include/bsp.h
index 7051615..7a82702 100644
--- a/c/src/lib/libbsp/mips/jmr3904/include/bsp.h
+++ b/c/src/lib/libbsp/mips/jmr3904/include/bsp.h
@@ -22,6 +22,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/mips/malta/include/bsp.h b/c/src/lib/libbsp/mips/malta/include/bsp.h
index 55aab3d..4fb3b11 100644
--- a/c/src/lib/libbsp/mips/malta/include/bsp.h
+++ b/c/src/lib/libbsp/mips/malta/include/bsp.h
@@ -22,6 +22,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/mips/rbtx4925/include/bsp.h b/c/src/lib/libbsp/mips/rbtx4925/include/bsp.h
index d50ce86..63072df 100644
--- a/c/src/lib/libbsp/mips/rbtx4925/include/bsp.h
+++ b/c/src/lib/libbsp/mips/rbtx4925/include/bsp.h
@@ -21,6 +21,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/mips/rbtx4938/include/bsp.h b/c/src/lib/libbsp/mips/rbtx4938/include/bsp.h
index 7459973..8f9e4fb 100644
--- a/c/src/lib/libbsp/mips/rbtx4938/include/bsp.h
+++ b/c/src/lib/libbsp/mips/rbtx4938/include/bsp.h
@@ -21,6 +21,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/include/bsp.h b/c/src/lib/libbsp/nios2/nios2_iss/include/bsp.h
index 3efd580..1c04f77 100644
--- a/c/src/lib/libbsp/nios2/nios2_iss/include/bsp.h
+++ b/c/src/lib/libbsp/nios2/nios2_iss/include/bsp.h
@@ -21,6 +21,7 @@ extern "C" {
#include <stdint.h>
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h b/c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h
index 96e248d..a172fca 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h
@@ -20,6 +20,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/powerpc/beatnik/include/bsp.h b/c/src/lib/libbsp/powerpc/beatnik/include/bsp.h
index 32fd3b4..a7f312d 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 <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/powerpc/beatnik/startup/bspclean.c b/c/src/lib/libbsp/powerpc/beatnik/startup/bspclean.c
index 1b63003..1539e44 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 <bsp/bootcard.h>
#include <rtems/bspIo.h>
-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 );
+}
diff --git a/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h b/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h
index dd69555..aaae560 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h
@@ -11,6 +11,7 @@
#define _BSP_H
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h b/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h
index c54846f..fab12cb 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h
@@ -122,6 +122,7 @@ extern "C" {
#include <bsp/irq.h>
#include <bsp/vectors.h>
#include <bsp/u-boot.h>
+#include <bsp/default-initial-extension.h>
/*
* Network driver configuration
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h b/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
index b8bcec7..fcead98 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
@@ -63,15 +63,16 @@ LINKER_SYMBOL(IMMRBAR);
#ifndef ASM
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <rtems.h>
#include <rtems/console.h>
#include <rtems/clockdrv.h>
#include <bsp/vectors.h>
#include <bsp/irq.h>
+#include <bsp/default-initial-extension.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
/*
* indicate, that BSP has no IDE driver
diff --git a/c/src/lib/libbsp/powerpc/haleakala/include/bsp.h b/c/src/lib/libbsp/powerpc/haleakala/include/bsp.h
index f0f6010..627c8f1 100644
--- a/c/src/lib/libbsp/powerpc/haleakala/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/haleakala/include/bsp.h
@@ -67,6 +67,7 @@ extern "C" {
#include <rtems/iosupp.h>
#include <bsp/irq.h>
#include <bsp/vectors.h>
+ #include <bsp/default-initial-extension.h>
/* Network Defines */
#define RTEMS_BSP_NETWORK_DRIVER_NAME "eth0"
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h b/c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h
index 3d4180a..d346901 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h
@@ -20,6 +20,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/include/bsp.h b/c/src/lib/libbsp/powerpc/motorola_powerpc/include/bsp.h
index d150e15..7df9a53 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/include/bsp.h
@@ -11,6 +11,7 @@
#define _BSP_H
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h b/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h
index a72f4da..251404f 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h
@@ -23,28 +23,27 @@
#ifndef LIBBSP_POWERPC_MPC55XXEVB_BSP_H
#define LIBBSP_POWERPC_MPC55XXEVB_BSP_H
-#include <stdint.h>
+#include <bspopts.h>
+
+#define BSP_SMALL_MEMORY 1
+
+#define BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN
+
+#define BSP_FEATURE_IRQ_EXTENSION
+
+#ifndef ASM
#include <rtems.h>
#include <rtems/console.h>
#include <rtems/clockdrv.h>
-#include <bspopts.h>
-
#include <bsp/tictac.h>
+#include <bsp/default-initial-extension.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#define BSP_SMALL_MEMORY 1
-
-#define BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN
-
-#define BSP_FEATURE_IRQ_EXTENSION
-
-#ifndef ASM
-
/** @brief System clock frequency */
extern unsigned int bsp_clock_speed;
@@ -78,10 +77,10 @@ void *bsp_idle_thread(uintptr_t arg);
#define BSP_IDLE_TASK_BODY bsp_idle_thread
-#endif /* ASM */
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
+#endif /* ASM */
+
#endif /* LIBBSP_POWERPC_MPC55XXEVB_BSP_H */
diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/include/bsp.h b/c/src/lib/libbsp/powerpc/mpc8260ads/include/bsp.h
index e16a2b3..3f03ea1 100644
--- a/c/src/lib/libbsp/powerpc/mpc8260ads/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/mpc8260ads/include/bsp.h
@@ -20,6 +20,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h b/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h
index 636945c..22e55f5 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h
@@ -13,6 +13,7 @@
#define _BSP_H
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h b/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h
index 0ae64e7..80159cc 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h
@@ -16,6 +16,7 @@
#define _BSP_H
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspclean.c b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspclean.c
index bf92820..fc488ea 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspclean.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspclean.c
@@ -8,8 +8,10 @@
#define AUTO_BOOT 0
-void bsp_cleanup(
- uint32_t status
+void bsp_fatal_extension(
+ rtems_fatal_source source,
+ bool is_internal,
+ rtems_fatal_code error
)
{
#if AUTO_BOOT
@@ -22,3 +24,10 @@ void bsp_cleanup(
printk("RTEMS terminated; Boot manually or turn on AUTO_BOOT.\n");
#endif
}
+
+void bsp_cleanup(
+ uint32_t status
+)
+{
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
+}
diff --git a/c/src/lib/libbsp/powerpc/psim/include/bsp.h b/c/src/lib/libbsp/powerpc/psim/include/bsp.h
index a90aecb..1ab7ab5 100644
--- a/c/src/lib/libbsp/powerpc/psim/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/psim/include/bsp.h
@@ -47,6 +47,7 @@ extern "C" {
#include <rtems/clockdrv.h>
#include <rtems/iosupp.h>
#include <bsp/vectors.h>
+#include <bsp/default-initial-extension.h>
/* Constants */
diff --git a/c/src/lib/libbsp/powerpc/qemuppc/include/bsp.h b/c/src/lib/libbsp/powerpc/qemuppc/include/bsp.h
index 9632bf9..1168540 100644
--- a/c/src/lib/libbsp/powerpc/qemuppc/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/qemuppc/include/bsp.h
@@ -18,6 +18,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/powerpc/qoriq/include/bsp.h b/c/src/lib/libbsp/powerpc/qoriq/include/bsp.h
index 47f9e52..70dc747 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/qoriq/include/bsp.h
@@ -29,6 +29,8 @@
#include <rtems.h>
+#include <bsp/default-initial-extension.h>
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@@ -57,10 +59,10 @@ int qoriq_if_intercom_attach_detach(
#define RTEMS_BSP_NETWORK_DRIVER_NAME3 "tsec3"
#define RTEMS_BSP_NETWORK_DRIVER_NAME4 "intercom1"
-#endif /* ASM */
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
+#endif /* ASM */
+
#endif /* LIBBSP_POWERPC_QORIQ_BSP_H */
diff --git a/c/src/lib/libbsp/powerpc/score603e/include/bsp.h b/c/src/lib/libbsp/powerpc/score603e/include/bsp.h
index c977510..94e5290 100644
--- a/c/src/lib/libbsp/powerpc/score603e/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/score603e/include/bsp.h
@@ -20,6 +20,7 @@ extern "C" {
#define BSP_ZERO_WORKSPACE_AUTOMATICALLY TRUE
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
#include <libcpu/io.h>
diff --git a/c/src/lib/libbsp/powerpc/ss555/include/bsp.h b/c/src/lib/libbsp/powerpc/ss555/include/bsp.h
index ae8bbce..6f12273 100644
--- a/c/src/lib/libbsp/powerpc/ss555/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/ss555/include/bsp.h
@@ -26,6 +26,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/powerpc/t32mppc/include/bsp.h b/c/src/lib/libbsp/powerpc/t32mppc/include/bsp.h
index 5266fea..f44663d 100644
--- a/c/src/lib/libbsp/powerpc/t32mppc/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/t32mppc/include/bsp.h
@@ -21,6 +21,8 @@
#include <rtems.h>
+#include <bsp/default-initial-extension.h>
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/include/bsp.h b/c/src/lib/libbsp/powerpc/tqm8xx/include/bsp.h
index 36ee87d..2306273 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/include/bsp.h
@@ -74,9 +74,6 @@ LINKER_SYMBOL( bsp_interrupt_stack_size);
LINKER_SYMBOL( bsp_work_area_start);
#ifndef ASM
-#ifdef __cplusplus
-extern "C" {
-#endif
#include <bspopts.h>
@@ -90,6 +87,11 @@ extern "C" {
#include <bsp/vectors.h>
#include <bsp/tqm.h>
#include <libcpu/powerpc-utility.h>
+#include <bsp/default-initial-extension.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
/*
* Network driver configuration
diff --git a/c/src/lib/libbsp/powerpc/virtex/include/bsp.h b/c/src/lib/libbsp/powerpc/virtex/include/bsp.h
index c5bb631..034ee54 100644
--- a/c/src/lib/libbsp/powerpc/virtex/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/virtex/include/bsp.h
@@ -59,6 +59,7 @@ extern "C" {
#include <rtems/iosupp.h>
#include <bsp/irq.h>
#include <bsp/vectors.h>
+#include <bsp/default-initial-extension.h>
/* miscellaneous stuff assumed to exist */
extern bool bsp_timer_internal_clock; /* TRUE, when timer runs with CPU clk */
diff --git a/c/src/lib/libbsp/powerpc/virtex4/include/bsp.h b/c/src/lib/libbsp/powerpc/virtex4/include/bsp.h
index cb45b66..7078ba8 100644
--- a/c/src/lib/libbsp/powerpc/virtex4/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/virtex4/include/bsp.h
@@ -63,6 +63,8 @@ extern "C" {
#include <rtems/clockdrv.h>
#include <rtems/iosupp.h>
+#include <bsp/default-initial-extension.h>
+
/* miscellaneous stuff assumed to exist */
extern bool bsp_timer_internal_clock; /* TRUE, when timer runs with CPU clk */
diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/bspclean.c b/c/src/lib/libbsp/powerpc/virtex4/startup/bspclean.c
index 75f95e6..3a2af55 100644
--- a/c/src/lib/libbsp/powerpc/virtex4/startup/bspclean.c
+++ b/c/src/lib/libbsp/powerpc/virtex4/startup/bspclean.c
@@ -40,10 +40,21 @@ static void _noopfun(void) {}
void app_bsp_cleanup(void)
__attribute__(( weak, alias("_noopfun") ));
-void bsp_cleanup( uint32_t status )
+void bsp_fatal_extension(
+ rtems_fatal_source source,
+ bool is_internal,
+ rtems_fatal_code error
+)
{
- app_bsp_cleanup();
+ if ( source == RTEMS_FATAL_SOURCE_EXIT ) {
+ app_bsp_cleanup();
+ }
/* All done. Hang out. */
BSP_ask_for_reset();
}
+
+void bsp_cleanup( uint32_t status )
+{
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
+}
diff --git a/c/src/lib/libbsp/powerpc/virtex5/include/bsp.h b/c/src/lib/libbsp/powerpc/virtex5/include/bsp.h
index cb45b66..5ed0f70 100644
--- a/c/src/lib/libbsp/powerpc/virtex5/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/virtex5/include/bsp.h
@@ -62,6 +62,7 @@ extern "C" {
#include <rtems/console.h>
#include <rtems/clockdrv.h>
#include <rtems/iosupp.h>
+#include <bsp/default-initial-extension.h>
/* miscellaneous stuff assumed to exist */
extern bool bsp_timer_internal_clock; /* TRUE, when timer runs with CPU clk */
diff --git a/c/src/lib/libbsp/powerpc/virtex5/startup/bspclean.c b/c/src/lib/libbsp/powerpc/virtex5/startup/bspclean.c
index 75f95e6..3a2af55 100644
--- a/c/src/lib/libbsp/powerpc/virtex5/startup/bspclean.c
+++ b/c/src/lib/libbsp/powerpc/virtex5/startup/bspclean.c
@@ -40,10 +40,21 @@ static void _noopfun(void) {}
void app_bsp_cleanup(void)
__attribute__(( weak, alias("_noopfun") ));
-void bsp_cleanup( uint32_t status )
+void bsp_fatal_extension(
+ rtems_fatal_source source,
+ bool is_internal,
+ rtems_fatal_code error
+)
{
- app_bsp_cleanup();
+ if ( source == RTEMS_FATAL_SOURCE_EXIT ) {
+ app_bsp_cleanup();
+ }
/* All done. Hang out. */
BSP_ask_for_reset();
}
+
+void bsp_cleanup( uint32_t status )
+{
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
+}
diff --git a/c/src/lib/libbsp/sh/gensh1/include/bsp.h b/c/src/lib/libbsp/sh/gensh1/include/bsp.h
index e1c28f0..f186e09 100644
--- a/c/src/lib/libbsp/sh/gensh1/include/bsp.h
+++ b/c/src/lib/libbsp/sh/gensh1/include/bsp.h
@@ -32,6 +32,7 @@ extern "C" {
#include <rtems/console.h>
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#define BSP_SMALL_MEMORY 1
diff --git a/c/src/lib/libbsp/sh/gensh2/include/bsp.h b/c/src/lib/libbsp/sh/gensh2/include/bsp.h
index 400bf45..5e253fe 100644
--- a/c/src/lib/libbsp/sh/gensh2/include/bsp.h
+++ b/c/src/lib/libbsp/sh/gensh2/include/bsp.h
@@ -43,6 +43,7 @@ extern "C" {
#include <rtems/console.h>
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#define BSP_SMALL_MEMORY 1
diff --git a/c/src/lib/libbsp/sh/gensh4/include/bsp.h b/c/src/lib/libbsp/sh/gensh4/include/bsp.h
index 317e3fc..01d4f32 100644
--- a/c/src/lib/libbsp/sh/gensh4/include/bsp.h
+++ b/c/src/lib/libbsp/sh/gensh4/include/bsp.h
@@ -46,6 +46,7 @@ extern "C" {
#include <rtems/clockdrv.h>
#include <rtems/console.h>
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include "rtems/score/sh7750_regs.h"
diff --git a/c/src/lib/libbsp/sh/shsim/include/bsp.h b/c/src/lib/libbsp/sh/shsim/include/bsp.h
index 2dc39a5..56d4c29 100644
--- a/c/src/lib/libbsp/sh/shsim/include/bsp.h
+++ b/c/src/lib/libbsp/sh/shsim/include/bsp.h
@@ -31,6 +31,7 @@ extern "C" {
#include <rtems/console.h>
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#define BSP_SMALL_MEMORY 1
diff --git a/c/src/lib/libbsp/shared/bspclean.c b/c/src/lib/libbsp/shared/bspclean.c
index e378d60..1d6f08a 100644
--- a/c/src/lib/libbsp/shared/bspclean.c
+++ b/c/src/lib/libbsp/shared/bspclean.c
@@ -13,8 +13,10 @@
#include <bsp/bootcard.h>
#include <rtems/bspIo.h>
-void bsp_cleanup(
- uint32_t status
+void bsp_fatal_extension(
+ rtems_fatal_source source,
+ bool is_internal,
+ rtems_fatal_code error
)
{
#if (BSP_PRESS_KEY_FOR_RESET)
@@ -37,3 +39,8 @@ void bsp_cleanup(
bsp_reset();
#endif
}
+
+void bsp_cleanup( uint32_t status )
+{
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
+}
diff --git a/c/src/lib/libbsp/sparc/erc32/Makefile.am b/c/src/lib/libbsp/sparc/erc32/Makefile.am
index 4f23ff1..ddb8d94 100644
--- a/c/src/lib/libbsp/sparc/erc32/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/Makefile.am
@@ -29,7 +29,6 @@ libbsp_a_SOURCES =
# startup
libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
- ../shared/startup/bspfatalextension.c \
startup/bsppredriver.c ../../sparc/shared/bspgetworkarea.c \
../../sparc/shared/bsppretaskinghook.c ../../shared/bsppost.c \
../../shared/bspstart.c ../../shared/bootcard.c ../../shared/bspinit.c \
diff --git a/c/src/lib/libbsp/sparc/erc32/include/bsp.h b/c/src/lib/libbsp/sparc/erc32/include/bsp.h
index 3fb9f13..5b3731d 100644
--- a/c/src/lib/libbsp/sparc/erc32/include/bsp.h
+++ b/c/src/lib/libbsp/sparc/erc32/include/bsp.h
@@ -25,6 +25,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
@@ -33,8 +34,6 @@ extern "C" {
#include <rtems/console.h>
#include <rtems/irq-extension.h>
-#include <bsp/default-initial-extension.h>
-
/*
* BSP provides its own Idle thread body
*/
@@ -53,6 +52,8 @@ extern int rtems_erc32_sonic_driver_attach(
/* Constants */
+#define BSP_RESET_BOARD_AT_EXIT 1
+
/*
* Information placed in the linkcmds file.
*/
diff --git a/c/src/lib/libbsp/sparc/leon2/Makefile.am b/c/src/lib/libbsp/sparc/leon2/Makefile.am
index f33c693..9699bf1 100644
--- a/c/src/lib/libbsp/sparc/leon2/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon2/Makefile.am
@@ -46,7 +46,6 @@ libbsp_a_SOURCES =
# startup
libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
- ../shared/startup/bspfatalextension.c \
../../shared/bsppost.c startup/bsppredriver.c \
startup/bspstart.c ../../sparc/shared/bsppretaskinghook.c \
../../sparc/shared/bspgetworkarea.c ../../shared/bootcard.c \
diff --git a/c/src/lib/libbsp/sparc/leon2/include/bsp.h b/c/src/lib/libbsp/sparc/leon2/include/bsp.h
index 009ae52..26b16a3 100644
--- a/c/src/lib/libbsp/sparc/leon2/include/bsp.h
+++ b/c/src/lib/libbsp/sparc/leon2/include/bsp.h
@@ -25,6 +25,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <leon.h>
@@ -32,8 +33,6 @@ extern "C" {
#include <rtems/console.h>
#include <rtems/irq-extension.h>
-#include <bsp/default-initial-extension.h>
-
/* SPARC CPU variant: LEON2 */
#define LEON2 1
@@ -73,6 +72,8 @@ extern int CPU_SPARC_HAS_SNOOPING;
/* Constants */
+#define BSP_RESET_BOARD_AT_EXIT 1
+
/*
* Information placed in the linkcmds file.
*/
diff --git a/c/src/lib/libbsp/sparc/leon3/Makefile.am b/c/src/lib/libbsp/sparc/leon3/Makefile.am
index dcdf1b0..8b21893 100644
--- a/c/src/lib/libbsp/sparc/leon3/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon3/Makefile.am
@@ -30,7 +30,6 @@ libbsp_a_SOURCES =
# startup
libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
- ../shared/startup/bspfatalextension.c \
../../shared/bsppost.c ../../shared/bootcard.c startup/bspstart.c \
../../sparc/shared/bsppretaskinghook.c startup/bsppredriver.c \
../../sparc/shared/bspgetworkarea.c ../../shared/sbrk.c startup/setvec.c \
diff --git a/c/src/lib/libbsp/sparc/leon3/include/bsp.h b/c/src/lib/libbsp/sparc/leon3/include/bsp.h
index 10697d5..3811423 100644
--- a/c/src/lib/libbsp/sparc/leon3/include/bsp.h
+++ b/c/src/lib/libbsp/sparc/leon3/include/bsp.h
@@ -25,6 +25,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <leon.h>
@@ -32,8 +33,6 @@ extern "C" {
#include <rtems/console.h>
#include <rtems/irq-extension.h>
-#include <bsp/default-initial-extension.h>
-
/* SPARC CPU variant: LEON3 */
#define LEON3 1
@@ -46,6 +45,8 @@ void *bsp_idle_thread( uintptr_t ignored );
/* Maximum supported APBUARTs by BSP */
#define BSP_NUMBER_OF_TERMIOS_PORTS 8
+#define BSP_RESET_BOARD_AT_EXIT 1
+
/*
* Network driver configuration
*/
diff --git a/c/src/lib/libbsp/sparc64/niagara/include/bsp.h b/c/src/lib/libbsp/sparc64/niagara/include/bsp.h
index 6a2c83e..f5280f7 100644
--- a/c/src/lib/libbsp/sparc64/niagara/include/bsp.h
+++ b/c/src/lib/libbsp/sparc64/niagara/include/bsp.h
@@ -24,6 +24,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/sparc64/usiii/include/bsp.h b/c/src/lib/libbsp/sparc64/usiii/include/bsp.h
index 31768df..347320d 100644
--- a/c/src/lib/libbsp/sparc64/usiii/include/bsp.h
+++ b/c/src/lib/libbsp/sparc64/usiii/include/bsp.h
@@ -26,6 +26,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/c/src/lib/libbsp/v850/gdbv850sim/include/bsp.h b/c/src/lib/libbsp/v850/gdbv850sim/include/bsp.h
index 807203f..04fe244 100644
--- a/c/src/lib/libbsp/v850/gdbv850sim/include/bsp.h
+++ b/c/src/lib/libbsp/v850/gdbv850sim/include/bsp.h
@@ -20,6 +20,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h
index e5003a9..0668915 100644
--- a/cpukit/score/include/rtems/score/interr.h
+++ b/cpukit/score/include/rtems/score/interr.h
@@ -60,6 +60,13 @@ typedef enum {
RTEMS_FATAL_SOURCE_APPLICATION,
/**
+ * @brief Fatal source of exit().
+ *
+ * The fatal code is the exit() status code.
+ */
+ RTEMS_FATAL_SOURCE_EXIT,
+
+ /**
* @brief The last available fatal source.
*
* This enum value ensures that the enum type needs at least 32-bits for
--
1.7.7
More information about the devel
mailing list