]> Git Repo - J-u-boot.git/commitdiff
armv8: Enable CPUECTLR.SMPEN for coherency
authorMingkai Hu <[email protected]>
Thu, 7 Jul 2016 04:22:12 +0000 (12:22 +0800)
committerTom Rini <[email protected]>
Fri, 8 Jul 2016 21:16:49 +0000 (17:16 -0400)
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 <[email protected]>
Signed-off-by: Gong Qianyu <[email protected]>
Reviewed-by: Masahiro Yamada <[email protected]>
arch/arm/cpu/armv8/start.S

index 670e323b61b37bc56bce5972fb80f13541263f94..dfce469206681acf558760c4faa9d6ef22c00010 100644 (file)
@@ -81,6 +81,14 @@ reset:
        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.
+        */
+       mrs     x0, S3_1_c15_c2_1               /* cpuactlr_el1 */
+       orr     x0, x0, #0x40
+       msr     S3_1_c15_c2_1, x0
+
        /* Apply ARM core specific erratas */
        bl      apply_core_errata
 
This page took 0.035067 seconds and 4 git commands to generate.