[PATCH] firmware: For no relocation skip two stage wait for secondary HARTs

Anup Patel Anup.Patel at wdc.com
Mon Jul 1 21:36:10 PDT 2019



> -----Original Message-----
> From: Anup Patel
> Sent: Monday, July 1, 2019 9:06 AM
> To: Atish Patra <Atish.Patra at wdc.com>; Alistair Francis
> <Alistair.Francis at wdc.com>
> Cc: Damien Le Moal <Damien.LeMoal at wdc.com>;
> opensbi at lists.infradead.org; Anup Patel <Anup.Patel at wdc.com>
> Subject: [PATCH] firmware: For no relocation skip two stage wait for
> secondary HARTs
> 
> When relocation is not required (i.e. _load_start == _link_start), we can skip
> two stage wait for secondary HARTs. This means secondary HARTs can skip
> the _wait_relocate_copy_done() loop and directly jump to the
> _wait_for_boot_hart() loop when no relocation not required.
> 
> Signed-off-by: Anup Patel <anup.patel at wdc.com>
> ---
>  firmware/fw_base.S | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/firmware/fw_base.S b/firmware/fw_base.S index
> 213396a..706db99 100644
> --- a/firmware/fw_base.S
> +++ b/firmware/fw_base.S
> @@ -106,6 +106,7 @@ _wait_relocate_copy_done:
>  	la	t0, _start
>  	la	t1, _link_start
>  	REG_L	t1, 0(t1)
> +	beq	t0, t1, _wait_for_boot_hart
>  	la	t2, _boot_status
>  	sub	t2, t2, t0
>  	add	t2, t2, t1
> --
> 2.17.1

Applied this patch on riscv/opensbi repo.

Regards,
Anup



More information about the opensbi mailing list