Skip to content
Commit e0432402 authored by Lukas Auer's avatar Lukas Auer Committed by Andes
Browse files

riscv: do not rely on hart ID passed by previous boot stage



RISC-V U-Boot expects the hart ID to be passed to it via register a0 by
the previous boot stage. Machine mode firmware such as BBL and OpenSBI
do this when starting their payload (U-Boot) in supervisor mode. If
U-Boot is running in machine mode, this task must be handled by the boot
ROM. Explicitly populate register a0 with the hart ID from the mhartid
CSR to avoid possible problems on RISC-V processors with a boot ROM that
does not handle this task.

Suggested-by: default avatarRick Chen <rick@andestech.com>
Signed-off-by: default avatarLukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: default avatarAnup Patel <anup.patel@wdc.com>
Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
Tested-by: default avatarBin Meng <bmeng.cn@gmail.com>
Reviewed-by: default avatarRick Chen <rick@andestech.com>
Tested-by: default avatarRick Chen <rick@andestech.com>
parent f28ad250
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment