public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <leif@nuviainc.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Laszlo Ersek <lersek@redhat.com>,
	devel@edk2.groups.io, Ard Biesheuvel <ardb+tianocore@kernel.org>
Subject: Re: [PATCH v2 1/1] ArmPkg/Library: prevent endless reboot loop with emulated NV varstore
Date: Thu, 4 Feb 2021 17:04:00 +0000	[thread overview]
Message-ID: <20210204170400.GA1664@vanye> (raw)
In-Reply-To: <CAMj1kXH1hM1W-qbqnf9ZRKwpArj9XTGwzcqgCNdtWtmNLypDWg@mail.gmail.com>

On Thu, Feb 04, 2021 at 16:49:03 +0100, Ard Biesheuvel wrote:
> > > +  gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable
> > >    gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString
> > >    gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
> > >    gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
> > > diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
> > > index 9905cad22908..5ceb23d822e5 100644
> > > --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
> > > +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
> > > @@ -848,11 +848,15 @@ PlatformBootManagerUnableToBoot (
> > >    // If the number of configured boot options has changed, reboot
> > >    // the system so the new boot options will be taken into account
> > >    // while executing the ordinary BDS bootflow sequence.
> > > +  // *Unless* persistent varstore is being emulated, since we would
> > > +  // then end up in an endless reboot loop.
> > >    //
> > > -  if (NewBootOptionCount != OldBootOptionCount) {
> > > -    DEBUG ((DEBUG_WARN, "%a: rebooting after refreshing all boot options\n",
> > > -      __FUNCTION__));
> > > -    gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL);
> > > +  if (!PcdGetBool (PcdEmuVariableNvModeEnable)) {
> > > +    if (NewBootOptionCount != OldBootOptionCount) {
> > > +      DEBUG ((DEBUG_WARN, "%a: rebooting after refreshing all boot options\n",
> > > +        __FUNCTION__));
> > > +      gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL);
> > > +    }
> > >    }
> > >
> > >    Status = EfiBootManagerGetBootManagerMenu (&BootManagerMenu);
> > >
> >
> > At the level where I commented on v1 -- i.e., totally superficially --:
> >
> > Acked-by: Laszlo Ersek <lersek@redhat.com>
> >
> > Ard should please review this patch for the logic change.
> >
> 
> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>

Thanks!
Pushed as 1b6c3a94eca7.

/
    Leif

      reply	other threads:[~2021-02-04 17:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 14:06 [PATCH v2 1/1] ArmPkg/Library: prevent endless reboot loop with emulated NV varstore Leif Lindholm
2021-02-04 14:17 ` Laszlo Ersek
2021-02-04 15:49   ` Ard Biesheuvel
2021-02-04 17:04     ` Leif Lindholm [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210204170400.GA1664@vanye \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox