diff options
author | Jules Maselbas <jmaselbas@kalray.eu> | 2021-03-05 19:33:26 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-03-17 11:55:30 +0100 |
commit | 8d3dfe350fbb7e02ba15234c540f3984cc65f762 (patch) | |
tree | cc48062a404d8eea17bf09fdaddf7cc93ad5124b /arch/kvx | |
parent | 4808d6f80073da71b6eaf12cd31fa7dbee3a9d1a (diff) | |
download | barebox-8d3dfe350fbb7e02ba15234c540f3984cc65f762.tar.gz barebox-8d3dfe350fbb7e02ba15234c540f3984cc65f762.tar.xz |
kvx: Request enough privilege to boot Linux
At startup barebox must take all the privileges that will be
requested by Linux.
Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/kvx')
-rw-r--r-- | arch/kvx/cpu/start.S | 4 | ||||
-rw-r--r-- | arch/kvx/include/asm/privilege.h | 16 |
2 files changed, 20 insertions, 0 deletions
diff --git a/arch/kvx/cpu/start.S b/arch/kvx/cpu/start.S index d90272c71f..a647e8a513 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 36b9ade494..f183b24d42 100644 --- a/arch/kvx/include/asm/privilege.h +++ b/arch/kvx/include/asm/privilege.h @@ -114,6 +114,21 @@ #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 */ #define MO_WFXL_OWN(__field, __pl) \ @@ -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) | \ |