[rtems commit] arm: Add CPU specific idle thread for ARMv7
Sebastian Huber
sebh at rtems.org
Mon May 27 10:45:20 UTC 2013
Module: rtems
Branch: master
Commit: d9bd5cd699ecad35e4319020db42d42f01871d4e
Changeset: http://git.rtems.org/rtems/commit/?id=d9bd5cd699ecad35e4319020db42d42f01871d4e
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed May 22 09:54:34 2013 +0200
arm: Add CPU specific idle thread for ARMv7
---
cpukit/score/cpu/arm/Makefile.am | 2 +-
.../{armv7m-thread-idle.c => armv7-thread-idle.c} | 4 ++--
cpukit/score/cpu/arm/rtems/score/arm.h | 6 ++++++
cpukit/score/cpu/arm/rtems/score/cpu.h | 2 +-
4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/cpukit/score/cpu/arm/Makefile.am b/cpukit/score/cpu/arm/Makefile.am
index 37ab901..46ce58c 100644
--- a/cpukit/score/cpu/arm/Makefile.am
+++ b/cpukit/score/cpu/arm/Makefile.am
@@ -25,6 +25,7 @@ libscorecpu_a_SOURCES += arm_exc_handler_high.c
libscorecpu_a_SOURCES += arm-exception-frame-print.c
libscorecpu_a_SOURCES += arm-exception-default.c
libscorecpu_a_SOURCES += armv4-exception-default.S
+libscorecpu_a_SOURCES += armv7-thread-idle.c
libscorecpu_a_SOURCES += armv7m-context-initialize.c
libscorecpu_a_SOURCES += armv7m-context-restore.c
libscorecpu_a_SOURCES += armv7m-context-switch.c
@@ -41,7 +42,6 @@ libscorecpu_a_SOURCES += armv7m-isr-level-get.c
libscorecpu_a_SOURCES += armv7m-isr-level-set.c
libscorecpu_a_SOURCES += armv7m-isr-vector-install.c
libscorecpu_a_SOURCES += armv7m-multitasking-start-stop.c
-libscorecpu_a_SOURCES += armv7m-thread-idle.c
include $(srcdir)/preinstall.am
include $(top_srcdir)/automake/local.am
diff --git a/cpukit/score/cpu/arm/armv7m-thread-idle.c b/cpukit/score/cpu/arm/armv7-thread-idle.c
similarity index 90%
rename from cpukit/score/cpu/arm/armv7m-thread-idle.c
rename to cpukit/score/cpu/arm/armv7-thread-idle.c
index 52a3dbd..7dfbc7f 100644
--- a/cpukit/score/cpu/arm/armv7m-thread-idle.c
+++ b/cpukit/score/cpu/arm/armv7-thread-idle.c
@@ -24,7 +24,7 @@
#include <rtems/score/cpu.h>
-#ifdef ARM_MULTILIB_ARCH_V7M
+#ifdef ARM_MULTILIB_HAS_WFI
void *_CPU_Thread_Idle_body( uintptr_t ignored )
{
@@ -33,4 +33,4 @@ void *_CPU_Thread_Idle_body( uintptr_t ignored )
}
}
-#endif /* ARM_MULTILIB_ARCH_V7M */
+#endif /* ARM_MULTILIB_HAS_WFI */
diff --git a/cpukit/score/cpu/arm/rtems/score/arm.h b/cpukit/score/cpu/arm/rtems/score/arm.h
index fb0f98e..0a3e724 100644
--- a/cpukit/score/cpu/arm/rtems/score/arm.h
+++ b/cpukit/score/cpu/arm/rtems/score/arm.h
@@ -37,6 +37,12 @@ extern "C" {
#define ARM_MULTILIB_ARCH_V4
#endif
+#if defined(__ARM_ARCH_7A__) \
+ || defined(__ARM_ARCH_7R__) \
+ || defined(__ARM_ARCH_7M__)
+ #define ARM_MULTILIB_HAS_WFI
+#endif
+
#if defined(__ARM_NEON__)
#define ARM_MULTILIB_VFP_D32
#elif !defined(__SOFTFP__)
diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h
index f00de73..e606146 100644
--- a/cpukit/score/cpu/arm/rtems/score/cpu.h
+++ b/cpukit/score/cpu/arm/rtems/score/cpu.h
@@ -138,7 +138,7 @@
#define CPU_USE_DEFERRED_FP_SWITCH FALSE
-#if defined(ARM_MULTILIB_ARCH_V7M)
+#if defined(ARM_MULTILIB_HAS_WFI)
#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
#else
#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
More information about the vc
mailing list