summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-16 06:34:39 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-16 06:41:32 +0200
commite71e271ce15504559f3bda019f5adc9ddb4fd0bf (patch)
tree08d9dff16e51c36ec799bba83af7b8faf7356de5
parentbsps/arm: Workaround for Errata 845369 (diff)
downloadrtems-e71e271ce15504559f3bda019f5adc9ddb4fd0bf.tar.bz2
bsps/arm: Add workaround for Errata 794072
Add a workaround for Cortex-A9 Errata 845369: A short loop including a DMB instruction might cause a denial of service on another which executes a CP15 broadcast operation. Close #4114.
-rw-r--r--bsps/arm/include/bsp/arm-a9mpcore-start.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/bsps/arm/include/bsp/arm-a9mpcore-start.h b/bsps/arm/include/bsp/arm-a9mpcore-start.h
index 83c84f1c72..724b335bf1 100644
--- a/bsps/arm/include/bsp/arm-a9mpcore-start.h
+++ b/bsps/arm/include/bsp/arm-a9mpcore-start.h
@@ -125,6 +125,21 @@ arm_a9mpcore_start_enable_smp_in_auxiliary_control(void)
}
BSP_START_TEXT_SECTION static inline void
+arm_a9mpcore_start_errata_794072_handler(void)
+{
+ uint32_t diag;
+
+ /*
+ * Workaround for Errata 794072: A short loop including a DMB instruction
+ * might cause a denial of service on another which executes a CP15 broadcast
+ * operation.
+ */
+ diag = arm_cp15_get_diagnostic_control();
+ diag |= 1U << 4;
+ arm_cp15_set_diagnostic_control(diag);
+}
+
+BSP_START_TEXT_SECTION static inline void
arm_a9mpcore_start_errata_845369_handler(void)
{
uint32_t diag;
@@ -152,6 +167,7 @@ BSP_START_TEXT_SECTION static inline void arm_a9mpcore_start_hook_0(void)
}
#ifdef RTEMS_SMP
+ arm_a9mpcore_start_errata_794072_handler();
arm_a9mpcore_start_errata_845369_handler();
arm_a9mpcore_start_enable_smp_in_auxiliary_control();
#endif