[PATCH] score: Add CPU_Exception_frame

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Nov 22 11:08:17 UTC 2012


Add RTEMS_FATAL_SOURCE_CPU_EXCEPTION.
---
 cpukit/score/cpu/no_cpu/rtems/score/cpu.h |   15 +++++++++++++++
 cpukit/score/include/rtems/score/interr.h |    9 +++++++++
 2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
index 9ab1f26..97a576c 100644
--- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
+++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
@@ -584,6 +584,21 @@ typedef struct {
 } CPU_Interrupt_frame;
 
 /**
+ *  @brief The set of registers that specify the complete execution 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() and RTEMS_FATAL_SOURCE_CPU_EXCEPTION.
+ */
+typedef struct {
+  /**
+   * @brief Some register.
+   */
+  uint32_t some_register;
+} 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
  *  @ref _CPU_Initialize and copied into the task's FP context area during
diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h
index 367c1ab..e06f98e 100644
--- a/cpukit/score/include/rtems/score/interr.h
+++ b/cpukit/score/include/rtems/score/interr.h
@@ -107,6 +107,15 @@ typedef enum {
   RTEMS_FATAL_SOURCE_POWERPC_EXCEPTION,
 
   /**
+   * @brief Fatal source of CPU exceptions.
+   *
+   * The fatal code is the pointer value of the CPU exception frame pointer.
+   *
+   * @see CPU_Exception_frame.
+   */
+  RTEMS_FATAL_SOURCE_CPU_EXCEPTION,
+
+  /**
    * @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