
On Sun, Apr 19, 2020 at 3:32 AM Atish Patra atish.patra@wdc.com wrote:
Linux booting protocol mandates that register "a0" contains the hartid. However, U-Boot can not pass the hartid via a0 during via standard UEFI protocol. DT nodes are commonly used to pass such information to the OS.
Add a DT node under chosen node to indicate the boot hartid. EFI stub in Linux kernel will parse this node and pass it to the real kernel in "a0" before jumping to it.
Signed-off-by: Atish Patra atish.patra@wdc.com Reviewed-by: Rick Chen rick@andestech.com Reviewed-by: Bin Meng bmeng.cn@gmail.com Tested-by: Heinrich Schuchardt xypron.glpk@gmx.de
arch/riscv/lib/bootm.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
Verified on booting OS, and dump DTB /chosen node
Tested-by: Bin Meng bmeng.cn@gmail.com