summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/arm/rtems/score/armv7m.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/cpu/arm/rtems/score/armv7m.h')
-rw-r--r--cpukit/score/cpu/arm/rtems/score/armv7m.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/cpukit/score/cpu/arm/rtems/score/armv7m.h b/cpukit/score/cpu/arm/rtems/score/armv7m.h
index 62f69ff490..3a41a0c707 100644
--- a/cpukit/score/cpu/arm/rtems/score/armv7m.h
+++ b/cpukit/score/cpu/arm/rtems/score/armv7m.h
@@ -1,3 +1,9 @@
+/**
+ * @file
+ *
+ * @brief ARMV7M Architecture Support
+ */
+
/*
* Copyright (c) 2011 Sebastian Huber. All rights reserved.
*
@@ -15,13 +21,14 @@
#ifndef RTEMS_SCORE_ARMV7M_H
#define RTEMS_SCORE_ARMV7M_H
-#include <stdint.h>
-#include <stdbool.h>
+#include <rtems/score/cpu.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
+#ifdef ARM_MULTILIB_ARCH_V7M
+
typedef struct {
uint32_t reserved_0;
uint32_t ictr;
@@ -58,6 +65,21 @@ typedef struct {
uint32_t icsr;
ARMV7M_Exception_handler *vtor;
+
+#define ARMV7M_SCB_AIRCR_VECTKEY (0x05fa << 16)
+#define ARMV7M_SCB_AIRCR_ENDIANESS (1U << 15)
+#define ARMV7M_SCB_AIRCR_PRIGROUP_SHIFT 8
+#define ARMV7M_SCB_AIRCR_PRIGROUP_MASK \
+ ((0x7U) << ARMV7M_SCB_AIRCR_PRIGROUP_SHIFT)
+#define ARMV7M_SCB_AIRCR_PRIGROUP(val) \
+ (((val) << ARMV7M_SCB_AIRCR_PRIGROUP_SHIFT) & ARMV7M_SCB_AIRCR_PRIGROUP_MASK)
+#define ARMV7M_SCB_AIRCR_PRIGROUP_GET(reg) \
+ (((val) & ARMV7M_SCB_AIRCR_PRIGROUP_MASK) >> ARMV7M_SCB_AIRCR_PRIGROUP_SHIFT)
+#define ARMV7M_SCB_AIRCR_PRIGROUP_SET(reg, val) \
+ (((reg) & ~ARMV7M_SCB_AIRCR_PRIGROUP_MASK) | ARMV7M_SCB_AIRCR_PRIGROUP(val))
+#define ARMV7M_SCB_AIRCR_SYSRESETREQ (1U << 2)
+#define ARMV7M_SCB_AIRCR_VECTCLRACTIVE (1U << 1)
+#define ARMV7M_SCB_AIRCR_VECTRESET (1U << 0)
uint32_t aircr;
uint32_t scr;
uint32_t ccr;
@@ -458,8 +480,7 @@ void _ARMV7M_Set_exception_handler(
);
/**
- * @brief ARMV7M Set Exception Priority and Handler
- *
+ * @brief ARMV7M set exception priority and handler.
*/
void _ARMV7M_Set_exception_priority_and_handler(
int index,
@@ -467,6 +488,8 @@ void _ARMV7M_Set_exception_priority_and_handler(
ARMV7M_Exception_handler handler
);
+void _ARMV7M_Exception_default( void );
+
void _ARMV7M_Interrupt_service_enter( void );
void _ARMV7M_Interrupt_service_leave( void );
@@ -475,6 +498,8 @@ void _ARMV7M_Pendable_service_call( void );
void _ARMV7M_Supervisor_call( void );
+#endif /* ARM_MULTILIB_ARCH_V7M */
+
#ifdef __cplusplus
}
#endif /* __cplusplus */