From: jvetter@kalrayinc.com
To: barebox@lists.infradead.org
Cc: ysionneau@kalrayinc.com, jborne@kalrayinc.com,
jhascoet@kalrayinc.com, clement@clement-leger.fr,
Julian Vetter <jvetter@kalrayinc.com>
Subject: [PATCH 3/5] kvx: robustify i/d cache startup
Date: Mon, 17 Jun 2024 15:43:27 +0200 [thread overview]
Message-ID: <20240617134329.3671762-4-jvetter@kalrayinc.com> (raw)
In-Reply-To: <20240617134329.3671762-1-jvetter@kalrayinc.com>
From: Julian Hascoet <jhascoet@kalrayinc.com>
Make sure the i/d caches start clean after enabling them. Also, make
sure there are no outstanding loads and/or stores before enabling them.
This might fix incoherency issues between caches and memory during the
boot of barebox.
Signed-off-by: Julien Hascoet <jhascoet@kalrayinc.com>
Signed-off-by: Julian Vetter <jvetter@kalrayinc.com>
Reviewed-by: Yann Sionneau <ysionneau@kalrayinc.com>
Reviewed-by: Jonathan Borne <jborne@kalrayinc.com>
---
arch/kvx/cpu/start.S | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/kvx/cpu/start.S b/arch/kvx/cpu/start.S
index 342c7d38a5..853676a836 100644
--- a/arch/kvx/cpu/start.S
+++ b/arch/kvx/cpu/start.S
@@ -50,10 +50,21 @@ ENTRY(kvx_start)
;;
/* Setup default processor status */
make $r25 = PS_WFXL_START_VALUE
+ /* Make sure there is no outstanding
+ * load(s)/store(s) before dcache enable
+ */
+ fence
;;
wfxl $ps, $r25
;;
+ /* Make sure icache starts clean */
+ i1inval
+ ;;
+ barrier
+ ;;
make $r25 = PCR_WFXM_START_VALUE
+ /* Make sure dcache starts clean */
+ d1inval
;;
wfxm $pcr, $r25
;;
--
2.34.1
next prev parent reply other threads:[~2024-06-17 13:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 13:43 Update kvx support jvetter
2024-06-17 13:43 ` [PATCH 1/5] kvx: Fix barebox build for kvx jvetter
2024-06-18 6:13 ` Sascha Hauer
2024-06-17 13:43 ` [PATCH 2/5] kvx: Add 'stop' instruction to power down sequence jvetter
2024-06-17 13:43 ` jvetter [this message]
2024-06-17 13:43 ` [PATCH 4/5] kvx: handle syscalls gracefully jvetter
2024-06-17 13:43 ` [PATCH 5/5] kvx: add support for Coolidge V1/V2 march selection jvetter
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=20240617134329.3671762-4-jvetter@kalrayinc.com \
--to=jvetter@kalrayinc.com \
--cc=barebox@lists.infradead.org \
--cc=clement@clement-leger.fr \
--cc=jborne@kalrayinc.com \
--cc=jhascoet@kalrayinc.com \
--cc=ysionneau@kalrayinc.com \
/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