From: Mark Rutland <mark.rutland@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] armv8: Enable CPUECTLR.SMPEN for data coherency
Date: Thu, 30 Jun 2016 18:45:14 +0100 [thread overview]
Message-ID: <20160630174513.GE29700@leverpostej> (raw)
In-Reply-To: <1467276708-46650-1-git-send-email-Qianyu.Gong@nxp.com>
On Thu, Jun 30, 2016 at 04:51:48PM +0800, Gong Qianyu wrote:
> 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
Please note that this register is IMPLEMENTATION DEFINED, and not
architectural, even though it happens to be common among ARM Ltd
implementations.
This is also not something that one can usually set on the Non-secure
side, and I'd expect Secure FW such as the ARM Trusted Firmware to
handle this.
If this is necessary within U-Boot, it should be guarded such that it
only runs on the relevant CPUs.
Thanks,
Mark.
prev parent reply other threads:[~2016-06-30 17:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160630174513.GE29700@leverpostej \
--to=mark.rutland@arm.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox