[PATCH 04/11] lib: sbi: Auto start domain only if boot HART within limits

Atish Patra atishp at atishpatra.org
Thu Dec 3 18:57:19 EST 2020


On Sat, Nov 21, 2020 at 2:52 PM Anup Patel <anup.patel at wdc.com> wrote:
>
> The sbi_domain_finalize() should auto start a domain only if the
> boot HART is withing limits (i.e. less than SBI_HARTMASK_MAX_BITS).
>
> Signed-off-by: Anup Patel <anup.patel at wdc.com>
> ---
>  lib/sbi/sbi_domain.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/lib/sbi/sbi_domain.c b/lib/sbi/sbi_domain.c
> index ac920b8..ecb098c 100644
> --- a/lib/sbi/sbi_domain.c
> +++ b/lib/sbi/sbi_domain.c
> @@ -403,6 +403,10 @@ int sbi_domain_finalize(struct sbi_scratch *scratch, u32 cold_hartid)
>                 /* Domain boot HART */
>                 dhart = dom->boot_hartid;
>
> +               /* Ignore of boot HART is off limits */
> +               if (SBI_HARTMASK_MAX_BITS <= dhart)
> +                       continue;
> +
>                 /* Ignore if boot HART not possible for this domain */
>                 if (!sbi_hartmask_test_hart(dhart, dom->possible_harts))
>                         continue;
> --
> 2.25.1
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi


Reviewed-by: Atish Patra <atish.patra at wdc.com>

-- 
Regards,
Atish



More information about the opensbi mailing list