Skip to content
Commit d2db2a8f authored by Anup Patel's avatar Anup Patel Committed by Andes
Browse files

riscv: Add kconfig option to run U-Boot in S-mode



This patch adds kconfig option RISCV_SMODE to run U-Boot in
S-mode. When this opition is enabled we use s<xyz> CSRs instead
of m<xyz> CSRs.

It is important to note that there is no equivalent S-mode CSR
for misa and mhartid CSRs so we expect M-mode runtime firmware
(BBL or equivalent) to emulate misa and mhartid CSR read.

In-future, we will have more patches to avoid accessing misa and
mhartid CSRs from S-mode.

Signed-off-by: default avatarAnup Patel <anup@brainfault.org>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
Tested-by: default avatarBin Meng <bmeng.cn@gmail.com>
Reviewed-by: default avatarLukas Auer <lukas.auer@aisec.fraunhofer.de>
parent 2e2a2a5d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment