From: Jules Maselbas <jmaselbas@kalray.eu>
To: barebox@lists.infradead.org
Cc: Yann Sionneau <ysionneau@kalray.eu>,
Jules Maselbas <jmaselbas@kalray.eu>,
Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v2 4/5] kvx: Request enough privilege to boot Linux
Date: Fri, 5 Mar 2021 19:33:26 +0100 [thread overview]
Message-ID: <20210305183327.29753-4-jmaselbas@kalray.eu> (raw)
In-Reply-To: <20210305183327.29753-1-jmaselbas@kalray.eu>
At startup barebox must take all the privileges that will be
requested by Linux.
Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
---
changes v1 -> v2: nothing
---
arch/kvx/cpu/start.S | 4 ++++
arch/kvx/include/asm/privilege.h | 16 ++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/arch/kvx/cpu/start.S b/arch/kvx/cpu/start.S
index d90272c71..a647e8a51 100644
--- a/arch/kvx/cpu/start.S
+++ b/arch/kvx/cpu/start.S
@@ -115,6 +115,10 @@ ENDPROC(kvx_start)
wfxl $psow = $r21 ;\
;; ;\
wfxm $psow = $r22 ;\
+ ;; ;\
+ make $r21 = DO_WFXL_VALUE_##__pl ;\
+ ;; ;\
+ wfxl $dow = $r21 ;\
;;
/**
diff --git a/arch/kvx/include/asm/privilege.h b/arch/kvx/include/asm/privilege.h
index 36b9ade49..f183b24d4 100644
--- a/arch/kvx/include/asm/privilege.h
+++ b/arch/kvx/include/asm/privilege.h
@@ -113,6 +113,21 @@
#define ITO_WFXM_VALUE_PL_CUR_PLUS_1 ITO_WFXM_VALUE(PL_CUR_PLUS_1)
#define ITO_WFXM_VALUE_PL_CUR ITO_WFXM_VALUE(PL_CUR)
+/**
+ * Debug Owner configuration
+ */
+
+#define DO_WFXL_OWN(__field, __pl) \
+ SFR_SET_VAL_WFXL(DO, __field, __pl)
+
+#define DO_WFXL_VALUE(__pl) (DO_WFXL_OWN(B0, __pl) | \
+ DO_WFXL_OWN(B1, __pl) | \
+ DO_WFXL_OWN(W0, __pl) | \
+ DO_WFXL_OWN(W1, __pl))
+
+#define DO_WFXL_VALUE_PL_CUR_PLUS_1 DO_WFXL_VALUE(PL_CUR_PLUS_1)
+#define DO_WFXL_VALUE_PL_CUR DO_WFXL_VALUE(PL_CUR)
+
/**
* Misc owner configuration
*/
@@ -160,6 +175,7 @@
PSO_WFXL_OWN(IE, __pl) | \
PSO_WFXL_OWN(HLE, __pl) | \
PSO_WFXL_OWN(SRE, __pl) | \
+ PSO_WFXL_OWN(DAUS, __pl) | \
PSO_WFXL_OWN(ICE, __pl) | \
PSO_WFXL_OWN(USE, __pl) | \
PSO_WFXL_OWN(DCE, __pl) | \
--
2.17.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-03-05 18:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-05 18:33 [PATCH v2 1/5] kvx: Implement setjmp/longjmp/initjmp Jules Maselbas
2021-03-05 18:33 ` [PATCH v2 2/5] kvx: Implement dcache invalidation primitive Jules Maselbas
2021-03-05 18:33 ` [PATCH v2 3/5] kvx: Implement dma handling primitives Jules Maselbas
2021-05-17 10:42 ` Ahmad Fatoum
2021-05-17 10:56 ` Jules Maselbas
2021-03-05 18:33 ` Jules Maselbas [this message]
2021-03-05 18:33 ` [PATCH v2 5/5] kvx: lib: dtb: Remove unused variable Jules Maselbas
2021-03-15 8:35 ` [PATCH v2 1/5] kvx: Implement setjmp/longjmp/initjmp Sascha Hauer
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=20210305183327.29753-4-jmaselbas@kalray.eu \
--to=jmaselbas@kalray.eu \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=ysionneau@kalray.eu \
/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