summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-11-25 17:48:11 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-11-27 17:03:40 +0100
commit815994fd17c2f732aacaf273a1e476a62de5f4a6 (patch)
tree17fffb992fcf3e025462215ee3c7515919d2ced4 /cpukit/score
parentpowerpc: Add CPU_Exception_frame (diff)
downloadrtems-815994fd17c2f732aacaf273a1e476a62de5f4a6.tar.bz2
score: Add CPU_Exception_frame
Add CPU port type CPU_Exception_frame and function _CPU_Exception_frame_print(). The CPU ports of avr, bfin, h8300, lm32, m32c, m32r, m68k, nios2, sh, sparc64, and v850 use an empty default implementation of _CPU_Exception_frame_print(). Add rtems_exception_frame and rtems_exception_frame_print(). Add RTEMS_FATAL_SOURCE_EXCEPTION for CPU exceptions. Use rtems_fatal() with source RTEMS_FATAL_SOURCE_EXCEPTION in CPU ports of i386, powerpc, and sparc for unexpected exceptions. Add third parameter to RTEMS_BSP_CLEANUP_OPTIONS() which controls the BSP_PRINT_EXCEPTION_CONTEXT define used in the default bsp_fatal_extension(). Add test sptests/spfatal26.
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/cpu/arm/Makefile.am2
-rw-r--r--cpukit/score/cpu/arm/arm-exception-frame-print.c28
-rw-r--r--cpukit/score/cpu/arm/armv7m-exception-frame-print.c28
-rw-r--r--cpukit/score/cpu/arm/rtems/score/cpu.h5
-rw-r--r--cpukit/score/cpu/avr/Makefile.am1
-rw-r--r--cpukit/score/cpu/avr/avr-exception-frame-print.c24
-rw-r--r--cpukit/score/cpu/avr/rtems/score/cpu.h5
-rw-r--r--cpukit/score/cpu/bfin/Makefile.am1
-rw-r--r--cpukit/score/cpu/bfin/bfin-exception-frame-print.c24
-rw-r--r--cpukit/score/cpu/bfin/rtems/score/cpu.h5
-rw-r--r--cpukit/score/cpu/h8300/Makefile.am1
-rw-r--r--cpukit/score/cpu/h8300/h8300-exception-frame-print.c24
-rw-r--r--cpukit/score/cpu/h8300/rtems/score/cpu.h5
-rw-r--r--cpukit/score/cpu/i386/cpu.c12
-rw-r--r--cpukit/score/cpu/i386/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/lm32/Makefile.am1
-rw-r--r--cpukit/score/cpu/lm32/lm32-exception-frame-print.c24
-rw-r--r--cpukit/score/cpu/lm32/rtems/score/cpu.h5
-rw-r--r--cpukit/score/cpu/m32c/Makefile.am1
-rw-r--r--cpukit/score/cpu/m32c/m32c-exception-frame-print.c24
-rw-r--r--cpukit/score/cpu/m32c/rtems/score/cpu.h5
-rw-r--r--cpukit/score/cpu/m32r/Makefile.am1
-rw-r--r--cpukit/score/cpu/m32r/m32r-exception-frame-print.c24
-rw-r--r--cpukit/score/cpu/m32r/rtems/score/cpu.h5
-rw-r--r--cpukit/score/cpu/m68k/Makefile.am1
-rw-r--r--cpukit/score/cpu/m68k/m68k-exception-frame-print.c24
-rw-r--r--cpukit/score/cpu/m68k/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/mips/rtems/score/cpu.h13
-rw-r--r--cpukit/score/cpu/nios2/Makefile.am1
-rw-r--r--cpukit/score/cpu/nios2/nios2-exception-frame-print.c24
-rw-r--r--cpukit/score/cpu/nios2/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/no_cpu/rtems/score/cpu.h22
-rw-r--r--cpukit/score/cpu/powerpc/rtems/score/cpu.h9
-rw-r--r--cpukit/score/cpu/sh/Makefile.am1
-rw-r--r--cpukit/score/cpu/sh/rtems/score/cpu.h4
-rw-r--r--cpukit/score/cpu/sh/sh-exception-frame-print.c24
-rw-r--r--cpukit/score/cpu/sparc/rtems/score/cpu.h14
-rw-r--r--cpukit/score/cpu/sparc64/Makefile.am1
-rw-r--r--cpukit/score/cpu/sparc64/rtems/score/cpu.h5
-rw-r--r--cpukit/score/cpu/sparc64/sparc64-exception-frame-print.c24
-rw-r--r--cpukit/score/cpu/v850/Makefile.am1
-rw-r--r--cpukit/score/cpu/v850/rtems/score/cpu.h5
-rw-r--r--cpukit/score/cpu/v850/v850-exception-frame-print.c24
-rw-r--r--cpukit/score/include/rtems/score/interr.h6
44 files changed, 458 insertions, 6 deletions
diff --git a/cpukit/score/cpu/arm/Makefile.am b/cpukit/score/cpu/arm/Makefile.am
index 0da1984297..f0ddbd679b 100644
--- a/cpukit/score/cpu/arm/Makefile.am
+++ b/cpukit/score/cpu/arm/Makefile.am
@@ -18,9 +18,11 @@ libscorecpu_a_SOURCES += arm_exc_abort.S
libscorecpu_a_SOURCES += arm_exc_interrupt.S
libscorecpu_a_SOURCES += arm_exc_handler_low.S
libscorecpu_a_SOURCES += arm_exc_handler_high.c
+libscorecpu_a_SOURCES += arm-exception-frame-print.c
libscorecpu_a_SOURCES += armv7m-context-initialize.c
libscorecpu_a_SOURCES += armv7m-context-restore.c
libscorecpu_a_SOURCES += armv7m-context-switch.c
+libscorecpu_a_SOURCES += armv7m-exception-frame-print.c
libscorecpu_a_SOURCES += armv7m-exception-handler-get.c
libscorecpu_a_SOURCES += armv7m-exception-handler-set.c
libscorecpu_a_SOURCES += armv7m-exception-priority-get.c
diff --git a/cpukit/score/cpu/arm/arm-exception-frame-print.c b/cpukit/score/cpu/arm/arm-exception-frame-print.c
new file mode 100644
index 0000000000..4d89f69f76
--- /dev/null
+++ b/cpukit/score/cpu/arm/arm-exception-frame-print.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/score/cpu.h>
+
+#ifdef ARM_MULTILIB_ARCH_V4
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
+{
+ /* TODO */
+}
+
+#endif /* ARM_MULTILIB_ARCH_V4 */
diff --git a/cpukit/score/cpu/arm/armv7m-exception-frame-print.c b/cpukit/score/cpu/arm/armv7m-exception-frame-print.c
new file mode 100644
index 0000000000..86931b2b24
--- /dev/null
+++ b/cpukit/score/cpu/arm/armv7m-exception-frame-print.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/score/cpu.h>
+
+#ifdef ARM_MULTILIB_ARCH_V7M
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
+{
+ /* TODO */
+}
+
+#endif /* ARM_MULTILIB_ARCH_V7M */
diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h
index 1528533d5e..e69f8037dc 100644
--- a/cpukit/score/cpu/arm/rtems/score/cpu.h
+++ b/cpukit/score/cpu/arm/rtems/score/cpu.h
@@ -582,8 +582,13 @@ typedef CPU_Exception_frame CPU_Interrupt_frame;
typedef void CPU_Interrupt_frame;
+/* FIXME */
+typedef CPU_Interrupt_frame CPU_Exception_frame;
+
#endif /* !defined(ARM_MULTILIB_ARCH_V4) */
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
+
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/score/cpu/avr/Makefile.am b/cpukit/score/cpu/avr/Makefile.am
index 4079b69171..efaf36ef67 100644
--- a/cpukit/score/cpu/avr/Makefile.am
+++ b/cpukit/score/cpu/avr/Makefile.am
@@ -161,6 +161,7 @@ include_rtems_avr_HEADERS += avr/wdt.h
noinst_LIBRARIES = libscorecpu.a
libscorecpu_a_SOURCES = cpu.c cpu_asm.S
+libscorecpu_a_SOURCES += avr-exception-frame-print.c
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
include $(srcdir)/preinstall.am
diff --git a/cpukit/score/cpu/avr/avr-exception-frame-print.c b/cpukit/score/cpu/avr/avr-exception-frame-print.c
new file mode 100644
index 0000000000..5ae49795e2
--- /dev/null
+++ b/cpukit/score/cpu/avr/avr-exception-frame-print.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/score/cpu.h>
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
+{
+ /* TODO */
+}
diff --git a/cpukit/score/cpu/avr/rtems/score/cpu.h b/cpukit/score/cpu/avr/rtems/score/cpu.h
index 5436c2181f..2bfcbceaf9 100644
--- a/cpukit/score/cpu/avr/rtems/score/cpu.h
+++ b/cpukit/score/cpu/avr/rtems/score/cpu.h
@@ -1112,6 +1112,11 @@ void _CPU_Context_restore_fp(
Context_Control_fp **fp_context_ptr
);
+/* FIXME */
+typedef CPU_Interrupt_frame CPU_Exception_frame;
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
+
/* The following routine swaps the endian format of an unsigned int.
* It must be static because it is referenced indirectly.
*
diff --git a/cpukit/score/cpu/bfin/Makefile.am b/cpukit/score/cpu/bfin/Makefile.am
index dfec9ea81e..c8a7cf72e2 100644
--- a/cpukit/score/cpu/bfin/Makefile.am
+++ b/cpukit/score/cpu/bfin/Makefile.am
@@ -16,6 +16,7 @@ include_rtems_score_HEADERS += rtems/score/types.h
noinst_LIBRARIES = libscorecpu.a
libscorecpu_a_SOURCES = cpu.c cpu_asm.S
+libscorecpu_a_SOURCES += bfin-exception-frame-print.c
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
include $(srcdir)/preinstall.am
diff --git a/cpukit/score/cpu/bfin/bfin-exception-frame-print.c b/cpukit/score/cpu/bfin/bfin-exception-frame-print.c
new file mode 100644
index 0000000000..5ae49795e2
--- /dev/null
+++ b/cpukit/score/cpu/bfin/bfin-exception-frame-print.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/score/cpu.h>
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
+{
+ /* TODO */
+}
diff --git a/cpukit/score/cpu/bfin/rtems/score/cpu.h b/cpukit/score/cpu/bfin/rtems/score/cpu.h
index a8cfc17d6d..85d5cd8ae6 100644
--- a/cpukit/score/cpu/bfin/rtems/score/cpu.h
+++ b/cpukit/score/cpu/bfin/rtems/score/cpu.h
@@ -1204,6 +1204,11 @@ void _CPU_Context_restore_fp(
Context_Control_fp **fp_context_ptr
);
+/* FIXME */
+typedef CPU_Interrupt_frame CPU_Exception_frame;
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
+
/**
* @ingroup CPUEndian
* The following routine swaps the endian format of an unsigned int.
diff --git a/cpukit/score/cpu/h8300/Makefile.am b/cpukit/score/cpu/h8300/Makefile.am
index 8ac7e76b20..5a3a8cc680 100644
--- a/cpukit/score/cpu/h8300/Makefile.am
+++ b/cpukit/score/cpu/h8300/Makefile.am
@@ -10,6 +10,7 @@ include_rtems_score_HEADERS += rtems/score/types.h
noinst_LIBRARIES = libscorecpu.a
libscorecpu_a_SOURCES = cpu.c cpu_asm.S
+libscorecpu_a_SOURCES += h8300-exception-frame-print.c
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
include $(srcdir)/preinstall.am
diff --git a/cpukit/score/cpu/h8300/h8300-exception-frame-print.c b/cpukit/score/cpu/h8300/h8300-exception-frame-print.c
new file mode 100644
index 0000000000..5ae49795e2
--- /dev/null
+++ b/cpukit/score/cpu/h8300/h8300-exception-frame-print.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/score/cpu.h>
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
+{
+ /* TODO */
+}
diff --git a/cpukit/score/cpu/h8300/rtems/score/cpu.h b/cpukit/score/cpu/h8300/rtems/score/cpu.h
index 1811ce779a..f8f41a821e 100644
--- a/cpukit/score/cpu/h8300/rtems/score/cpu.h
+++ b/cpukit/score/cpu/h8300/rtems/score/cpu.h
@@ -1095,6 +1095,11 @@ void _CPU_Context_restore_fp(
Context_Control_fp **fp_context_ptr
);
+/* FIXME */
+typedef CPU_Interrupt_frame CPU_Exception_frame;
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
+
/* The following routine swaps the endian format of an unsigned int.
* It must be static because it is referenced indirectly.
*
diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
index acd2768730..15ff3c7619 100644
--- a/cpukit/score/cpu/i386/cpu.c
+++ b/cpukit/score/cpu/i386/cpu.c
@@ -117,7 +117,7 @@ struct Frame_ {
uintptr_t pc;
};
-static void _defaultExcHandler (CPU_Exception_frame *ctx)
+void _CPU_Exception_frame_print (const CPU_Exception_frame *ctx)
{
unsigned int faultAddr = 0;
printk("----------------------------------------------------------\n");
@@ -148,7 +148,6 @@ static void _defaultExcHandler (CPU_Exception_frame *ctx)
* because the eip points to the faulty instruction so...
*/
printk("Exception while executing ISR!!!. System locked\n");
- _CPU_Fatal_halt(faultAddr);
}
else {
struct Frame_ *fp = (struct Frame_*)ctx->ebp;
@@ -171,10 +170,17 @@ static void _defaultExcHandler (CPU_Exception_frame *ctx)
printk(" ************ FAULTY THREAD WILL BE SUSPENDED **************\n");
rtems_task_suspend(_Thread_Executing->Object.id);
#endif
- bsp_reset();
}
}
+static void _defaultExcHandler (CPU_Exception_frame *ctx)
+{
+ rtems_fatal(
+ RTEMS_FATAL_SOURCE_EXCEPTION,
+ (rtems_fatal_code) ctx
+ );
+}
+
cpuExcHandlerType _currentExcHandler = _defaultExcHandler;
extern void rtems_exception_prologue_0(void);
diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h
index 2a48711cd7..03d6209981 100644
--- a/cpukit/score/cpu/i386/rtems/score/cpu.h
+++ b/cpukit/score/cpu/i386/rtems/score/cpu.h
@@ -665,6 +665,8 @@ void _CPU_Context_restore_fp(
} while (0)
#endif
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
+
#endif /* ASM */
#ifdef __cplusplus
diff --git a/cpukit/score/cpu/lm32/Makefile.am b/cpukit/score/cpu/lm32/Makefile.am
index d3b49bff2e..c03e11c2eb 100644
--- a/cpukit/score/cpu/lm32/Makefile.am
+++ b/cpukit/score/cpu/lm32/Makefile.am
@@ -11,6 +11,7 @@ include_rtems_score_HEADERS += rtems/score/types.h
noinst_LIBRARIES = libscorecpu.a
libscorecpu_a_SOURCES = cpu.c cpu_asm.S irq.c
+libscorecpu_a_SOURCES += lm32-exception-frame-print.c
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
include $(srcdir)/preinstall.am
diff --git a/cpukit/score/cpu/lm32/lm32-exception-frame-print.c b/cpukit/score/cpu/lm32/lm32-exception-frame-print.c
new file mode 100644
index 0000000000..5ae49795e2
--- /dev/null
+++ b/cpukit/score/cpu/lm32/lm32-exception-frame-print.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/score/cpu.h>
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
+{
+ /* TODO */
+}
diff --git a/cpukit/score/cpu/lm32/rtems/score/cpu.h b/cpukit/score/cpu/lm32/rtems/score/cpu.h
index 9f0876a3f4..7f10a53820 100644
--- a/cpukit/score/cpu/lm32/rtems/score/cpu.h
+++ b/cpukit/score/cpu/lm32/rtems/score/cpu.h
@@ -1195,6 +1195,11 @@ void _CPU_Context_restore_fp(
Context_Control_fp **fp_context_ptr
);
+/* FIXME */
+typedef CPU_Interrupt_frame CPU_Exception_frame;
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
+
/**
* @ingroup CPUEndian
* The following routine swaps the endian format of an unsigned int.
diff --git a/cpukit/score/cpu/m32c/Makefile.am b/cpukit/score/cpu/m32c/Makefile.am
index f836c58ff1..4d63dfdb0e 100644
--- a/cpukit/score/cpu/m32c/Makefile.am
+++ b/cpukit/score/cpu/m32c/Makefile.am
@@ -14,6 +14,7 @@ include_rtems_score_HEADERS += rtems/score/types.h
noinst_LIBRARIES = libscorecpu.a
libscorecpu_a_SOURCES = cpu.c cpu_asm.c context_switch.S context_init.c \
varvects.S
+libscorecpu_a_SOURCES += m32c-exception-frame-print.c
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
include $(srcdir)/preinstall.am
diff --git a/cpukit/score/cpu/m32c/m32c-exception-frame-print.c b/cpukit/score/cpu/m32c/m32c-exception-frame-print.c
new file mode 100644
index 0000000000..5ae49795e2
--- /dev/null
+++ b/cpukit/score/cpu/m32c/m32c-exception-frame-print.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/score/cpu.h>
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
+{
+ /* TODO */
+}
diff --git a/cpukit/score/cpu/m32c/rtems/score/cpu.h b/cpukit/score/cpu/m32c/rtems/score/cpu.h
index d83e93d009..10cdc5b60a 100644
--- a/cpukit/score/cpu/m32c/rtems/score/cpu.h
+++ b/cpukit/score/cpu/m32c/rtems/score/cpu.h
@@ -1131,6 +1131,11 @@ void _CPU_Context_restore(
Context_Control *new_context
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
+/* FIXME */
+typedef CPU_Interrupt_frame CPU_Exception_frame;
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
+
/**
* @ingroup CPUEndian
* The following routine swaps the endian format of an unsigned int.
diff --git a/cpukit/score/cpu/m32r/Makefile.am b/cpukit/score/cpu/m32r/Makefile.am
index 37b49ed30c..9db2c89ff4 100644
--- a/cpukit/score/cpu/m32r/Makefile.am
+++ b/cpukit/score/cpu/m32r/Makefile.am
@@ -13,6 +13,7 @@ include_rtems_score_HEADERS += rtems/score/types.h
noinst_LIBRARIES = libscorecpu.a
libscorecpu_a_SOURCES = cpu.c cpu_asm.c context_switch.S context_init.c
+libscorecpu_a_SOURCES += m32r-exception-frame-print.c
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
include $(srcdir)/preinstall.am
diff --git a/cpukit/score/cpu/m32r/m32r-exception-frame-print.c b/cpukit/score/cpu/m32r/m32r-exception-frame-print.c
new file mode 100644
index 0000000000..5ae49795e2
--- /dev/null
+++ b/cpukit/score/cpu/m32r/m32r-exception-frame-print.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/score/cpu.h>
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
+{
+ /* TODO */
+}
diff --git a/cpukit/score/cpu/m32r/rtems/score/cpu.h b/cpukit/score/cpu/m32r/rtems/score/cpu.h
index 02bc928617..df5b196382 100644
--- a/cpukit/score/cpu/m32r/rtems/score/cpu.h
+++ b/cpukit/score/cpu/m32r/rtems/score/cpu.h
@@ -1189,6 +1189,11 @@ void _CPU_Context_restore_fp(
Context_Control_fp **fp_context_ptr
);
+/* FIXME */
+typedef CPU_Interrupt_frame CPU_Exception_frame;
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
+
/**
* @ingroup CPUEndian
* The following routine swaps the endian format of an unsigned int.
diff --git a/cpukit/score/cpu/m68k/Makefile.am b/cpukit/score/cpu/m68k/Makefile.am
index 319cbdd181..56691777ee 100644
--- a/cpukit/score/cpu/m68k/Makefile.am
+++ b/cpukit/score/cpu/m68k/Makefile.am
@@ -18,6 +18,7 @@ include_rtems_score_HEADERS += rtems/score/m68k.h
include_rtems_score_HEADERS += rtems/score/types.h
libscorecpu_a_SOURCES = cpu.c cpu_asm.S
+libscorecpu_a_SOURCES += m68k-exception-frame-print.c
include $(srcdir)/preinstall.am
include $(top_srcdir)/automake/local.am
diff --git a/cpukit/score/cpu/m68k/m68k-exception-frame-print.c b/cpukit/score/cpu/m68k/m68k-exception-frame-print.c
new file mode 100644
index 0000000000..5ae49795e2
--- /dev/null
+++ b/cpukit/score/cpu/m68k/m68k-exception-frame-print.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/score/cpu.h>
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
+{
+ /* TODO */
+}
diff --git a/cpukit/score/cpu/m68k/rtems/score/cpu.h b/cpukit/score/cpu/m68k/rtems/score/cpu.h
index 89b0295f60..fb970eb108 100644
--- a/cpukit/score/cpu/m68k/rtems/score/cpu.h
+++ b/cpukit/score/cpu/m68k/rtems/score/cpu.h
@@ -709,6 +709,8 @@ void _CPU_Context_restore_fp(
Context_Control_fp **fp_context_ptr
);
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
+
#if (M68K_HAS_FPSP_PACKAGE == 1)
/*
* Hooks for the Floating Point Support Package (FPSP) provided by Motorola
diff --git a/cpukit/score/cpu/mips/rtems/score/cpu.h b/cpukit/score/cpu/mips/rtems/score/cpu.h
index 9aa72d41d4..1da23db423 100644
--- a/cpukit/score/cpu/mips/rtems/score/cpu.h
+++ b/cpukit/score/cpu/mips/rtems/score/cpu.h
@@ -609,6 +609,8 @@ typedef struct
} CPU_Interrupt_frame;
+typedef CPU_Interrupt_frame CPU_Exception_frame;
+
/*
* This variable is optional. It is used on CPUs on which it is difficult
* to generate an "uninitialized" FP context. It is filled in by
@@ -703,6 +705,8 @@ extern unsigned int mips_interrupt_number_of_vectors;
#define CPU_STACK_ALIGNMENT CPU_ALIGNMENT
+void mips_vector_exceptions( CPU_Interrupt_frame *frame );
+
/*
* ISR handler macros
*/
@@ -1112,6 +1116,15 @@ void _CPU_Context_restore_fp(
Context_Control_fp **fp_context_ptr
);
+void _BSP_Exception_frame_print( const CPU_Exception_frame *frame );
+
+static inline void _CPU_Exception_frame_print(
+ const CPU_Exception_frame *frame
+)
+{
+ _BSP_Exception_frame_print( frame );
+}
+
/* The following routine swaps the endian format of an unsigned int.
* It must be static because it is referenced indirectly.
*
diff --git a/cpukit/score/cpu/nios2/Makefile.am b/cpukit/score/cpu/nios2/Makefile.am
index f662946ac6..c2947dd855 100644
--- a/cpukit/score/cpu/nios2/Makefile.am
+++ b/cpukit/score/cpu/nios2/Makefile.am
@@ -24,6 +24,7 @@ libscorecpu_a_SOURCES += nios2-context-initialize.c
libscorecpu_a_SOURCES += nios2-context-switch.S
libscorecpu_a_SOURCES += nios2-eic-il-low-level.S
libscorecpu_a_SOURCES += nios2-eic-rsie-low-level.S
+libscorecpu_a_SOURCES += nios2-exception-frame-print.c
libscorecpu_a_SOURCES += nios2-fatal-halt.c
libscorecpu_a_SOURCES += nios2-iic-low-level.S
libscorecpu_a_SOURCES += nios2-initialize.c
diff --git a/cpukit/score/cpu/nios2/nios2-exception-frame-print.c b/cpukit/score/cpu/nios2/nios2-exception-frame-print.c
new file mode 100644
index 0000000000..5ae49795e2
--- /dev/null
+++ b/cpukit/score/cpu/nios2/nios2-exception-frame-print.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/score/cpu.h>
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
+{
+ /* TODO */
+}
diff --git a/cpukit/score/cpu/nios2/rtems/score/cpu.h b/cpukit/score/cpu/nios2/rtems/score/cpu.h
index 4d61c42021..68ab01df34 100644
--- a/cpukit/score/cpu/nios2/rtems/score/cpu.h
+++ b/cpukit/score/cpu/nios2/rtems/score/cpu.h
@@ -338,6 +338,8 @@ void _CPU_Context_restore(
Context_Control *new_context
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
+
static inline uint32_t CPU_swap_u32( uint32_t value )
{
uint32_t byte1, byte2, byte3, byte4, swapped;
diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
index 9ab1f264c8..fe63aea3fc 100644
--- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
+++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
@@ -1264,6 +1264,28 @@ void _CPU_Context_restore_fp(
);
/**
+ * @brief The set of registers that specifies the complete processor state.
+ *
+ * The CPU exception frame may be available in fatal error conditions like for
+ * example illegal opcodes, instruction fetch errors, or data access errors.
+ *
+ * @see rtems_fatal(), RTEMS_FATAL_SOURCE_EXCEPTION, and
+ * rtems_exception_frame_print().
+ */
+typedef struct {
+ uint32_t processor_state_register;
+ uint32_t integer_registers [1];
+ double float_registers [1];
+} CPU_Exception_frame;
+
+/**
+ * @brief Prints the exception frame via printk().
+ *
+ * @see rtems_fatal() and RTEMS_FATAL_SOURCE_EXCEPTION.
+ */
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
+
+/**
* @ingroup CPUEndian
* The following routine swaps the endian format of an unsigned int.
* It must be static because it is referenced indirectly.
diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
index 290f0db1f6..e776f3ccf2 100644
--- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
@@ -1036,6 +1036,15 @@ typedef struct {
PPC_GPR_TYPE GPR31;
} CPU_Exception_frame;
+void _BSP_Exception_frame_print( const CPU_Exception_frame *frame );
+
+static inline void _CPU_Exception_frame_print(
+ const CPU_Exception_frame *frame
+)
+{
+ _BSP_Exception_frame_print( frame );
+}
+
/*
* _CPU_Initialize_altivec()
*
diff --git a/cpukit/score/cpu/sh/Makefile.am b/cpukit/score/cpu/sh/Makefile.am
index 8e148d81d2..a524dfcec7 100644
--- a/cpukit/score/cpu/sh/Makefile.am
+++ b/cpukit/score/cpu/sh/Makefile.am
@@ -11,6 +11,7 @@ include_rtems_score_HEADERS += rtems/score/sh_io.h
noinst_LIBRARIES = libscorecpu.a
libscorecpu_a_SOURCES = cpu.c context.c
+libscorecpu_a_SOURCES += sh-exception-frame-print.c
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
include $(srcdir)/preinstall.am
diff --git a/cpukit/score/cpu/sh/rtems/score/cpu.h b/cpukit/score/cpu/sh/rtems/score/cpu.h
index 789024e781..9a61b5e940 100644
--- a/cpukit/score/cpu/sh/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sh/rtems/score/cpu.h
@@ -885,6 +885,10 @@ void _CPU_Context_restore_fp(
Context_Control_fp **fp_context_ptr
);
+/* FIXME */
+typedef CPU_Interrupt_frame CPU_Exception_frame;
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
#ifdef __cplusplus
}
diff --git a/cpukit/score/cpu/sh/sh-exception-frame-print.c b/cpukit/score/cpu/sh/sh-exception-frame-print.c
new file mode 100644
index 0000000000..5ae49795e2
--- /dev/null
+++ b/cpukit/score/cpu/sh/sh-exception-frame-print.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/score/cpu.h>
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
+{
+ /* TODO */
+}
diff --git a/cpukit/score/cpu/sparc/rtems/score/cpu.h b/cpukit/score/cpu/sparc/rtems/score/cpu.h
index d92b63c14e..2e1e718780 100644
--- a/cpukit/score/cpu/sparc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc/rtems/score/cpu.h
@@ -1221,6 +1221,20 @@ void _CPU_Context_restore_fp(
Context_Control_fp **fp_context_ptr
);
+typedef struct {
+ uint32_t trap;
+ CPU_Interrupt_frame *isf;
+} CPU_Exception_frame;
+
+void _BSP_Exception_frame_print( const CPU_Exception_frame *frame );
+
+static inline void _CPU_Exception_frame_print(
+ const CPU_Exception_frame *frame
+)
+{
+ _BSP_Exception_frame_print( frame );
+}
+
/**
* @brief SPARC Specific Method to Endian Swap an uint32_t
*
diff --git a/cpukit/score/cpu/sparc64/Makefile.am b/cpukit/score/cpu/sparc64/Makefile.am
index 33ba8441e6..2897a46dc7 100644
--- a/cpukit/score/cpu/sparc64/Makefile.am
+++ b/cpukit/score/cpu/sparc64/Makefile.am
@@ -13,6 +13,7 @@ include_rtems_score_HEADERS += rtems/score/types.h
noinst_LIBRARIES = libscorecpu.a
libscorecpu_a_SOURCES = context.S cpu.c
+libscorecpu_a_SOURCES += sparc64-exception-frame-print.c
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
include $(srcdir)/preinstall.am
diff --git a/cpukit/score/cpu/sparc64/rtems/score/cpu.h b/cpukit/score/cpu/sparc64/rtems/score/cpu.h
index f821e96d42..f78400f564 100644
--- a/cpukit/score/cpu/sparc64/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc64/rtems/score/cpu.h
@@ -1024,6 +1024,11 @@ void _CPU_Context_restore_fp(
Context_Control_fp **fp_context_ptr
);
+/* FIXME */
+typedef CPU_Interrupt_frame CPU_Exception_frame;
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
+
/*
* CPU_swap_u32
*
diff --git a/cpukit/score/cpu/sparc64/sparc64-exception-frame-print.c b/cpukit/score/cpu/sparc64/sparc64-exception-frame-print.c
new file mode 100644
index 0000000000..5ae49795e2
--- /dev/null
+++ b/cpukit/score/cpu/sparc64/sparc64-exception-frame-print.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/score/cpu.h>
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
+{
+ /* TODO */
+}
diff --git a/cpukit/score/cpu/v850/Makefile.am b/cpukit/score/cpu/v850/Makefile.am
index 2119f6224d..6f1ce67c72 100644
--- a/cpukit/score/cpu/v850/Makefile.am
+++ b/cpukit/score/cpu/v850/Makefile.am
@@ -11,6 +11,7 @@ include_rtems_score_HEADERS += rtems/score/cpu_asm.h rtems/score/types.h
noinst_LIBRARIES = libscorecpu.a
libscorecpu_a_SOURCES = cpu.c
libscorecpu_a_SOURCES += cpu_asm.S
+libscorecpu_a_SOURCES += v850-exception-frame-print.c
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
include $(srcdir)/preinstall.am
diff --git a/cpukit/score/cpu/v850/rtems/score/cpu.h b/cpukit/score/cpu/v850/rtems/score/cpu.h
index 371bc327e0..d77344bdca 100644
--- a/cpukit/score/cpu/v850/rtems/score/cpu.h
+++ b/cpukit/score/cpu/v850/rtems/score/cpu.h
@@ -1124,6 +1124,11 @@ void _CPU_Context_restore_fp(
);
#endif
+/* FIXME */
+typedef CPU_Interrupt_frame CPU_Exception_frame;
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
+
/**
* @ingroup CPUEndian
* The following routine swaps the endian format of an unsigned int.
diff --git a/cpukit/score/cpu/v850/v850-exception-frame-print.c b/cpukit/score/cpu/v850/v850-exception-frame-print.c
new file mode 100644
index 0000000000..5ae49795e2
--- /dev/null
+++ b/cpukit/score/cpu/v850/v850-exception-frame-print.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/score/cpu.h>
+
+void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
+{
+ /* TODO */
+}
diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h
index 367c1abbba..e325e68d3b 100644
--- a/cpukit/score/include/rtems/score/interr.h
+++ b/cpukit/score/include/rtems/score/interr.h
@@ -98,13 +98,13 @@ typedef enum {
RTEMS_FATAL_SOURCE_STACK_CHECKER,
/**
- * @brief Fatal source of the PowerPC exceptions.
+ * @brief Fatal source of the exceptions.
*
* The fatal code is the pointer value of the exception frame pointer.
*
- * @see BSP_Exception_frame.
+ * @see rtems_exception_frame and rtems_exception_frame_print().
*/
- RTEMS_FATAL_SOURCE_POWERPC_EXCEPTION,
+ RTEMS_FATAL_SOURCE_EXCEPTION,
/**
* @brief The last available fatal source.