summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv8/start.S
diff options
context:
space:
mode:
authorMingkai Hu <mingkai.hu@nxp.com>2017-01-06 09:41:10 (GMT)
committerYork Sun <york.sun@nxp.com>2017-01-18 17:27:47 (GMT)
commit3aec452e4dbd16be7bdbabfa80d1fcc840cf342c (patch)
treefda8d849bee699d9ac92321405478b3df9f579d2 /arch/arm/cpu/armv8/start.S
parent9e0bb4c1d9560cf8af0657939d01d7da8ef0f342 (diff)
downloadu-boot-fsl-qoriq-3aec452e4dbd16be7bdbabfa80d1fcc840cf342c.tar.xz
armv8: Enable CPUECTLR.SMPEN for coherency
For A53, data coherency is enabled only when the CPUECTLR.SMPEN bit is set. The SMPEN bit should be set before enabling the data cache. If not enabled, the cache is not coherent with other cores and data corruption could occur. For A57/A72, SMPEN bit enables the processor to receive instruction cache and TLB maintenance operations broadcast from other processors in the cluster. This bit should be set before enabling the caches and MMU, or performing any cache and TLB maintenance operations. Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com> Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com> Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'arch/arm/cpu/armv8/start.S')
-rw-r--r--arch/arm/cpu/armv8/start.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
index 4f5f6d8..5308702 100644
--- a/arch/arm/cpu/armv8/start.S
+++ b/arch/arm/cpu/armv8/start.S
@@ -86,6 +86,17 @@ save_boot_params_ret:
msr cpacr_el1, x0 /* Enable FP/SIMD */
0:
+ /*
+ * Enalbe SMPEN bit for coherency.
+ * This register is not architectural but at the moment
+ * this bit should be set for A53/A57/A72.
+ */
+#ifdef CONFIG_ARMV8_SET_SMPEN
+ mrs x0, S3_1_c15_c2_1 /* cpuactlr_el1 */
+ orr x0, x0, #0x40
+ msr S3_1_c15_c2_1, x0
+#endif
+
/* Apply ARM core specific erratas */
bl apply_core_errata