riscv: save hart ID and device tree passed by prior boot stage
authorLukas Auer <lukas.auer@aisec.fraunhofer.de>
Thu, 22 Nov 2018 10:26:29 +0000 (11:26 +0100)
committerAndes <uboot@andestech.com>
Mon, 26 Nov 2018 05:57:32 +0000 (13:57 +0800)
commit5d8b2e77119ff85420e3074e5c1ac1f5939a1b75
treee2f00ee946051e491bfabd5d5764c04d81c80646
parent31f9058994fcf29ff1ed0766c6c96f00e32702d6
riscv: save hart ID and device tree passed by prior boot stage

Store the hart ID and device tree passed by the prior boot stage (in a0
and a1) in registers s0 and s1. Replace one use of s1 in start.S to
avoid overwriting it.

The device tree is also stored in memory to make it available to U-Boot
with the configuration CONFIG_OF_PRIOR_STAGE.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
arch/riscv/cpu/cpu.c
arch/riscv/cpu/start.S