public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: devel@edk2.groups.io, pete@akeo.ie
Cc: afish@apple.com, lersek@redhat.com, liming.gao@intel.com
Subject: Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/PlatformBootManagerLib: Don't update progress if Pcd is 0
Date: Mon, 14 Oct 2019 17:34:24 +0200	[thread overview]
Message-ID: <d4aeb80e-8889-7947-b8b6-5729eecf7166@redhat.com> (raw)
In-Reply-To: <20191014150311.16740-3-pete@akeo.ie>

On 10/14/19 5:03 PM, Pete Batard wrote:
> Similar to what we now do for OVMF, we need to consider the possibility
> that PlatformBootManagerWaitCallback () may be called with a
> PcdPlatformBootTimeOut that was set to zero, in which case the call should
> simply return.

Oh I forgot this one, good catch.

> We also change the initial timeout variable name to make the code explicit.
> 
> Signed-off-by: Pete Batard <pete@akeo.ie>
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> ---
>   ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c | 14 +++++++++++---
>   1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
> index 30c015eec5b0..5f6cfe64daca 100644
> --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
> +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
> @@ -842,9 +842,17 @@ PlatformBootManagerWaitCallback (
>   {
>     EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black;
>     EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White;
> -  UINT16                              Timeout;
> +  UINT16                              TimeoutInitial;
>   
> -  Timeout = PcdGet16 (PcdPlatformBootTimeOut);
> +  TimeoutInitial = PcdGet16 (PcdPlatformBootTimeOut);
> +
> +  //
> +  // If PcdPlatformBootTimeOut is set to zero, then we consider
> +  // that no progress update should be enacted.
> +  //
> +  if (TimeoutInitial == 0) {
> +    return;
> +  }
>   
>     Black.Raw = 0x00000000;
>     White.Raw = 0x00FFFFFF;
> @@ -854,7 +862,7 @@ PlatformBootManagerWaitCallback (
>       Black.Pixel,
>       L"Start boot option",
>       White.Pixel,
> -    (Timeout - TimeoutRemain) * 100 / Timeout,
> +    (TimeoutInitial - TimeoutRemain) * 100 / TimeoutInitial,
>       0
>       );
>   }
> 

Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>

  reply	other threads:[~2019-10-14 15:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 15:03 [PATCH v2 0/2] PlatformBootManagerLib: Don't update progress if Pcd is 0 Pete Batard
2019-10-14 15:03 ` [PATCH v2 1/2] OvmfPkg/PlatformBootManagerLib: " Pete Batard
2019-10-14 15:33   ` [edk2-devel] " Philippe Mathieu-Daudé
2019-10-14 15:03 ` [PATCH v2 2/2] ArmVirtPkg/PlatformBootManagerLib: " Pete Batard
2019-10-14 15:34   ` Philippe Mathieu-Daudé [this message]
2019-10-14 18:36 ` [edk2-devel] [PATCH v2 0/2] PlatformBootManagerLib: " Laszlo Ersek
2019-10-16 16:36   ` Laszlo Ersek

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=d4aeb80e-8889-7947-b8b6-5729eecf7166@redhat.com \
    --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