From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.groups.io with SMTP id smtpd.web12.3999.1571064318089020567 for ; Mon, 14 Oct 2019 07:45:18 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7AB628980EE; Mon, 14 Oct 2019 14:45:17 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-117-254.ams2.redhat.com [10.36.117.254]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F55C608C2; Mon, 14 Oct 2019 14:45:15 +0000 (UTC) Subject: Re: [PATCH 1/1] MdeModulePkg/BdsDxe: Fix calling PlatformBootManagerWaitCallback on 0 To: "Gao, Liming" , Pete Batard Cc: "devel@edk2.groups.io" , "afish@apple.com" References: <20191011154337.1652-1-pete@akeo.ie> <20191011154337.1652-2-pete@akeo.ie> <4A89E2EF3DFEDB4C8BFDE51014F606A14E51619C@SHSMSX104.ccr.corp.intel.com> From: "Laszlo Ersek" Message-ID: <80e32ddf-c653-5c59-f2ff-37ba1a8a8179@redhat.com> Date: Mon, 14 Oct 2019 16:45:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E51619C@SHSMSX104.ccr.corp.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.67]); Mon, 14 Oct 2019 14:45:17 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Liming, On 10/12/19 03:44, Gao, Liming wrote: > Reviewed-by: Liming Gao can you please add Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2266 to the commit message, before pushing this? (I'm not giving R-b or A-b myself, because I shouldn't approve code whose authorship is attributed to me. I obviously agree with the patch.) Thanks all, Laszlo >> -----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 >> Subject: [PATCH 1/1] MdeModulePkg/BdsDxe: Fix calling >> PlatformBootManagerWaitCallback on 0 >> >> From: Laszlo Ersek >> >> 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 >> --- >> 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")); >> } >>