public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] armv8: Enable CPUECTLR.SMPEN for data coherency
@ 2016-06-30  8:51 Gong Qianyu
  2016-06-30  9:39 ` Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Gong Qianyu @ 2016-06-30  8:51 UTC (permalink / raw)
  To: u-boot

From: Mingkai Hu <mingkai.hu@nxp.com>

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.

Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>

diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
index 670e323..735dd67 100644
--- a/arch/arm/cpu/armv8/start.S
+++ b/arch/arm/cpu/armv8/start.S
@@ -81,6 +81,11 @@ reset:
 	msr	cpacr_el1, x0			/* Enable FP/SIMD */
 0:
 
+	/* Enalbe SMPEN bit */
+	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
 
-- 
2.1.0.27.g96db324

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-07-05  5:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-30  8:51 [U-Boot] [PATCH] armv8: Enable CPUECTLR.SMPEN for data coherency Gong Qianyu
2016-06-30  9:39 ` Masahiro Yamada
2016-06-30 17:02 ` york sun
2016-06-30 23:54   ` Prabhakar Kushwaha
2016-07-01  8:33     ` Mingkai Hu
2016-07-01 21:44     ` Edward L Swarthout
2016-07-04  2:08       ` Mingkai Hu
2016-07-05  5:06       ` Prabhakar Kushwaha
2016-06-30 17:45 ` Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox