[PATCH] efi_loader: Use sysreset instead of reset command

Masami Hiramatsu masami.hiramatsu at linaro.org
Wed Mar 16 08:07:02 CET 2022


Hi Heinrich and Simon,

OK, I will introduce a dependency of SYSRESET to EFI_CAPSULE_ON_DISK.
Thank you,

2022年3月16日(水) 6:15 Simon Glass <sjg at chromium.org>:
>
> Hi Heinrich,
>
> On Tue, 15 Mar 2022 at 12:26, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> >
> >
> >
> > Am 15. März 2022 18:47:09 MEZ schrieb Simon Glass <sjg at chromium.org>:
> > >Hi Heinrich,
> > >
> > >On Tue, 15 Mar 2022 at 04:31, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> > >>
> > >> On 3/15/22 01:43, Masami Hiramatsu wrote:
> > >> > Use sysreset_walk_halt() directly from reset-after-capsule-on-disk
> > >> > feature to reboot (cold reset) machine instead of using reset command
> > >> > interface, since this is not a command.
> > >>
> > >> As long as not all UEFI supported boards use sysreset you cannot do this
> > >> change. See wandboard_defconfig.
> > >
> > >We can make the feature depend on SYSRESET.
> >
> > Is there anything requiring this change? If not leave it as it is for now and set a deadline for the migration of the boards.
>
> Yes, it makes the test painful, as I understand it. We should not use
> do_reset() to reset, from new code. That is a legacy thing. New code
> should use up-to-data features.
>
> No more deadlines for now, there is too much push-back :-)
>
> Regards,
> Simon
>
>
>
> > >> > Signed-off-by: Masami Hiramatsu <masami.hiramatsu at linaro.org>
> > >> > ---
> > >> >   lib/efi_loader/efi_capsule.c |    4 ++--
> > >> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > >> >
> > >> > diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
> > >> > index 613b531b82..35907ad0d2 100644
> > >> > --- a/lib/efi_loader/efi_capsule.c
> > >> > +++ b/lib/efi_loader/efi_capsule.c
> > >> > @@ -1150,9 +1150,9 @@ efi_status_t efi_launch_capsules(void)
> > >> >        * UEFI spec requires to reset system after complete processing capsule
> > >> >        * update on the storage.
> > >> >        */
> > >> > -     log_info("Reboot after firmware update");
> > >> > +     log_info("Reboot after firmware update.\n");
> > >> >       /* Cold reset is required for loading the new firmware. */
> > >> > -     do_reset(NULL, 0, 0, NULL);
> > >> > +     sysreset_walk_halt(SYSRESET_COLD);
> > >> >       hang();
> > >> >       /* not reach here */
> > >> >
> > >> >
> > >>



-- 
Masami Hiramatsu


More information about the U-Boot mailing list