[PATCH v6 1/6] riscv: Add boot hartid to device tree

Bin Meng bmeng.cn at gmail.com
Mon Apr 20 07:29:37 CEST 2020


On Sun, Apr 19, 2020 at 3:32 AM Atish Patra <atish.patra at 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 at wdc.com>
> Reviewed-by: Rick Chen <rick at andestech.com>
> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
> Tested-by: Heinrich Schuchardt <xypron.glpk at 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 at gmail.com>


More information about the U-Boot mailing list