summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2016-07-02 14:33:11 +0200
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2016-07-04 15:55:57 +0200
commit0cb50ab25b3e2cb9ccf0f4961e0229415e211cb7 (patch)
tree91e5283ffb2fab25af73eb916e527e84e5dc81f7
parentarm/raspberrypi: Enable HYP to SVC switch for this BSP. (diff)
downloadrtems-0cb50ab25b3e2cb9ccf0f4961e0229415e211cb7.tar.bz2
score/arm: Ensure that copile time alignment is 64 bytes for Cortex-A multilib.
Some/many Cortex-A cores have data cache line length 64 bytes and maximum value has to be used for system structures alignment.
-rw-r--r--cpukit/score/cpu/arm/rtems/score/arm.h4
-rw-r--r--cpukit/score/cpu/arm/rtems/score/cpu.h7
2 files changed, 9 insertions, 2 deletions
diff --git a/cpukit/score/cpu/arm/rtems/score/arm.h b/cpukit/score/cpu/arm/rtems/score/arm.h
index 334e73a7ff..666ee54068 100644
--- a/cpukit/score/cpu/arm/rtems/score/arm.h
+++ b/cpukit/score/cpu/arm/rtems/score/arm.h
@@ -54,6 +54,10 @@ extern "C" {
#define ARM_MULTILIB_HAS_THREAD_ID_REGISTER
#endif
+#if defined(__ARM_ARCH_7A__)
+ #define ARM_MULTILIB_CACHE_LINE_MAX_64
+#endif
+
#if !defined(__SOFTFP__)
#if defined(__ARM_NEON__)
#define ARM_MULTILIB_VFP_D32
diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h
index 91e4ec6211..adaf8091d3 100644
--- a/cpukit/score/cpu/arm/rtems/score/cpu.h
+++ b/cpukit/score/cpu/arm/rtems/score/cpu.h
@@ -145,8 +145,11 @@
#define CPU_STACK_GROWS_UP FALSE
-/* FIXME: Is this the right value? */
-#define CPU_CACHE_LINE_BYTES 32
+#if defined(ARM_MULTILIB_CACHE_LINE_MAX_64)
+ #define CPU_CACHE_LINE_BYTES 32
+#else
+ #define CPU_CACHE_LINE_BYTES 64
+#endif
#define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES )