[PATCH 06/11] lib: sbi: Override domain boot HART when coldboot HART assigned to it

Atish Patra atishp at atishpatra.org
Fri Dec 4 01:17:42 EST 2020


On Sat, Nov 21, 2020 at 2:52 PM Anup Patel <anup.patel at wdc.com> wrote:
>
> If coldboot HART is assigned to a domain then we should use coldboot
> HART as the boot HART of the domain. This allows coldboot HART to
> continue boot sequence even when it is assigned to some non-root domain.
>
> Signed-off-by: Anup Patel <anup.patel at wdc.com>
> ---
>  lib/sbi/sbi_domain.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/lib/sbi/sbi_domain.c b/lib/sbi/sbi_domain.c
> index ecb098c..1b50604 100644
> --- a/lib/sbi/sbi_domain.c
> +++ b/lib/sbi/sbi_domain.c
> @@ -395,6 +395,17 @@ int sbi_domain_finalize(struct sbi_scratch *scratch, u32 cold_hartid)
>                                                 &tdom->assigned_harts);
>                         hartid_to_domain_table[i] = dom;
>                         sbi_hartmask_set_hart(i, &dom->assigned_harts);
> +
> +                       /*
> +                        * If cold boot HART is assigned to this domain then
> +                        * override boot HART of this domain.
> +                        */
> +                       if (i == cold_hartid &&
> +                           dom->boot_hartid != cold_hartid) {
> +                               sbi_printf("Domain%d Boot HARTID forced to"
> +                                          " %d\n", dom->index, cold_hartid);
> +                               dom->boot_hartid = cold_hartid;
> +                       }
>                 }
>         }
>
> --
> 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