u-boot-brain/arch/riscv/lib
Bin Meng a6d7e8c914 riscv: Split SiFive CLINT support between SPL and U-Boot proper
At present there is only one Kconfig option CONFIG_SIFIVE_CLINT to
control the enabling of SiFive CLINT support in both SPL (M-mode)
and U-Boot proper (S-mode). So for a typical SPL config that the
SiFive CLINT driver is enabled in both SPL and U-Boot proper, that
means the S-mode U-Boot tries to access the memory-mapped CLINT
registers directly, instead of the normal 'rdtime' instruction.

This was not a problem before, as the hardware does not forbid the
access from S-mode. However this becomes an issue now with OpenSBI
commit 8b569803475e ("lib: utils/sys: Add CLINT memregion in the root domain")
that the SiFive CLINT register space is protected by PMP for M-mode
access only. U-Boot proper does not boot any more with the latest
OpenSBI, that access exceptions are fired forever from U-Boot when
trying to read the timer value via the SiFive CLINT driver in U-Boot.

To solve this, we need to split current SiFive CLINT support between
SPL and U-Boot proper, using 2 separate Kconfig options.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
2021-05-17 16:42:24 +08:00
..
andes_plic.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
asm-offsets.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
boot.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
bootm.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
cache.c common: Move some cache and MMU functions out of common.h 2019-12-02 18:23:55 -05:00
crt0_riscv_efi.S riscv: Complete efi header for RV32/64 2020-12-14 15:16:54 +08:00
elf_riscv32_efi.lds SPDX: Convert single license tags to Linux Kernel style 2018-05-29 14:44:21 +08:00
elf_riscv64_efi.lds SPDX: Convert single license tags to Linux Kernel style 2018-05-29 14:44:21 +08:00
fdt_fixup.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
image.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
interrupts.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
Makefile riscv: Split SiFive CLINT support between SPL and U-Boot proper 2021-05-17 16:42:24 +08:00
memcpy.S riscv: assembler versions of memcpy, memmove, memset 2021-04-08 15:37:29 +08:00
memmove.S riscv: assembler versions of memcpy, memmove, memset 2021-04-08 15:37:29 +08:00
memset.S riscv: assembler versions of memcpy, memmove, memset 2021-04-08 15:37:29 +08:00
mkimage_fit_opensbi.sh riscv: add a generic FIT generator script 2019-08-26 16:07:42 +08:00
reloc_riscv_efi.c riscv: Remove unused _relocate arguments 2018-07-19 16:31:37 -04:00
reset.c Revert "riscv: Allow use of reset drivers" 2020-07-24 14:55:31 +08:00
sbi_ipi.c riscv: Clean up IPI initialization code 2020-07-01 15:01:22 +08:00
sbi.c cmd: provide command sbi 2020-08-25 09:34:47 +08:00
setjmp.S riscv: simplify longjmp 2021-04-08 15:37:29 +08:00
sifive_clint.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
smp.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
spl.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00