public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Liming Gao" <liming.gao@intel.com>
To: Pete Batard <pete@akeo.ie>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "afish@apple.com" <afish@apple.com>,
	"lersek@redhat.com" <lersek@redhat.com>
Subject: Re: [PATCH 1/1] MdeModulePkg/BdsDxe: Fix calling PlatformBootManagerWaitCallback on 0
Date: Sat, 12 Oct 2019 01:44:33 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E51619C@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20191011154337.1652-2-pete@akeo.ie>

Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: Pete Batard [mailto:pete@akeo.ie]
>Sent: Friday, October 11, 2019 11:44 PM
>To: devel@edk2.groups.io
>Cc: afish@apple.com; lersek@redhat.com; Gao, Liming <liming.gao@intel.com>
>Subject: [PATCH 1/1] MdeModulePkg/BdsDxe: Fix calling
>PlatformBootManagerWaitCallback on 0
>
>From: Laszlo Ersek <lersek@redhat.com>
>
>Commit 2de1f611be06ded3a59726a4052a9039be7d459b introduced a
>regression
>whereas platforms that did set PcdPlatformBootTimeOut to 0 are now getting
>an unexpected call to PlatformBootManagerWaitCallback().
>
>This patch also ensures that, if PcdPlatformBootTimeOut is 0xFFFF we don't
>call PlatformBootManagerWaitCallback() with a zero argument as doing so
>would produce an unwarranted jump to full progress completion which is
>likely to throw off users.
>
>Signed-off-by: Pete Batard <pete@akeo.ie>
>---
> MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
>diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
>b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
>index 7968a58f3454..d6ec31118c1f 100644
>--- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
>+++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
>@@ -341,7 +341,17 @@ BdsWait (
>       TimeoutRemain--;
>     }
>   }
>-  PlatformBootManagerWaitCallback (0);
>+
>+  //
>+  // If the platform configured a nonzero and finite time-out, and we have
>+  // actually reached that, report 100% completion to the platform.
>+  //
>+  // Note that the (TimeoutRemain == 0) condition excludes
>+  // PcdPlatformBootTimeOut=0xFFFF, and that's deliberate.
>+  //
>+  if (PcdGet16 (PcdPlatformBootTimeOut) != 0 && TimeoutRemain == 0) {
>+    PlatformBootManagerWaitCallback (0);
>+  }
>   DEBUG ((EFI_D_INFO, "[Bds]Exit the waiting!\n"));
> }
>
>--
>2.21.0.windows.1


  reply	other threads:[~2019-10-12  1:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11 15:43 [PATCH 0/1] MdeModulePkg/BdsDxe: Fix calling PlatformBootManagerWaitCallback on 0 Pete Batard
2019-10-11 15:43 ` [PATCH 1/1] " Pete Batard
2019-10-12  1:44   ` Liming Gao [this message]
2019-10-14 14:45     ` Laszlo Ersek
2019-10-15  0:17       ` [edk2-devel] " Liming Gao

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=4A89E2EF3DFEDB4C8BFDE51014F606A14E51619C@SHSMSX104.ccr.corp.intel.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