From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web11.1006.1570844676333507518 for ; Fri, 11 Oct 2019 18:44:36 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2019 18:44:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,286,1566889200"; d="scan'208";a="219572258" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga004.fm.intel.com with ESMTP; 11 Oct 2019 18:44:36 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 11 Oct 2019 18:44:35 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 11 Oct 2019 18:44:35 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 11 Oct 2019 18:44:35 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.166]) by SHSMSX152.ccr.corp.intel.com ([10.239.6.52]) with mapi id 14.03.0439.000; Sat, 12 Oct 2019 09:44:33 +0800 From: "Liming Gao" To: Pete Batard , "devel@edk2.groups.io" CC: "afish@apple.com" , "lersek@redhat.com" Subject: Re: [PATCH 1/1] MdeModulePkg/BdsDxe: Fix calling PlatformBootManagerWaitCallback on 0 Thread-Topic: [PATCH 1/1] MdeModulePkg/BdsDxe: Fix calling PlatformBootManagerWaitCallback on 0 Thread-Index: AQHVgEq15kKseLMMFk6cpCEjkomz06dWPFsw Date: Sat, 12 Oct 2019 01:44:33 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E51619C@SHSMSX104.ccr.corp.intel.com> References: <20191011154337.1652-1-pete@akeo.ie> <20191011154337.1652-2-pete@akeo.ie> In-Reply-To: <20191011154337.1652-2-pete@akeo.ie> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----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 hav= e >+ // actually reached that, report 100% completion to the platform. >+ // >+ // Note that the (TimeoutRemain =3D=3D 0) condition excludes >+ // PcdPlatformBootTimeOut=3D0xFFFF, and that's deliberate. >+ // >+ if (PcdGet16 (PcdPlatformBootTimeOut) !=3D 0 && TimeoutRemain =3D=3D 0)= { >+ PlatformBootManagerWaitCallback (0); >+ } > DEBUG ((EFI_D_INFO, "[Bds]Exit the waiting!\n")); > } > >-- >2.21.0.windows.1