[PATCH] lib:firmware: Select preferred boot hart for cold boot.

Xiang W wxjstz at 126.com
Wed Jan 24 06:31:17 PST 2024


在 2024-01-24星期三的 05:25 +0000,yangcheng.work at foxmail.com写道:
> > add check here
> >       if (scratch->boot_hart != -1UL && sbi_platform_cold_boot_allowed(plat, scratch->boot_hart)
> >               sbi_hart_hang();
> 
> What this check means is that if the preferred hart does not allow cold boot, will we enter sbi_hart_hang? 
> So should the conditions for judgment be like if (scratch->boot_hart != -1UL && !sbi_platform_cold_boot_allowed(plat, scratch-
> >boot_hart))?
Yes! This's right

Regards,
Xiang W
> 
> > > +    if (sbi_platform_cold_boot_allowed(plat, hartid) && next_mode_supported) {
> > > +            if (scratch->boot_hart == -1) {
> > replace -1 with -1UL
> > > +                    if (atomic_xchg(&coldboot_lottery, 1) == 0)
> > > +                            coldboot = true;
> > > +            } else {
> > > +                    if (scratch->boot_hart == hartid)
> > > +                            coldboot = true;
> > > +            }
> > >      }
> > >  
> 
> Sorry the email I sent before was not plain text, I have changed the format now.
> Thank u.
> 
> Regards
> Cheng Yang



More information about the opensbi mailing list