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

riscv: save hart ID in register tp instead of s0



The hart ID passed by the previous boot stage is currently stored in
register s0. If we divert the control flow inside a function, which is
required as part of multi-hart support, the function epilog may not be
called, clobbering register s0. Save the hart ID in the unallocatable
register tp instead to protect the hart ID.

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