From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Thu, 26 Sep 2019 12:30:17 -0700 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BCB2F18C429B; Thu, 26 Sep 2019 19:30:16 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-49.rdu2.redhat.com [10.10.120.49]) by smtp.corp.redhat.com (Postfix) with ESMTP id 832285D9D5; Thu, 26 Sep 2019 19:30:15 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/BdsDxe: Also call PlatformBootManagerWaitCallback on 0 To: devel@edk2.groups.io, pete@akeo.ie Cc: zhichao.gao@intel.com, ray.ni@intel.com References: <20190925155005.12532-1-pete@akeo.ie> From: "Laszlo Ersek" Message-ID: <8bacbb53-98df-724e-b704-b5059d11e378@redhat.com> Date: Thu, 26 Sep 2019 21:30: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: <20190925155005.12532-1-pete@akeo.ie> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.62]); Thu, 26 Sep 2019 19:30:16 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 09/25/19 17:50, Pete Batard wrote: > The existing loop is set to call PlatformBootManagerWaitCallback every > second except the last one. We believe this is a mistake as it prevents > the called code from performing timeout expiration tasks such as, for > instance, ensuring that the last segment of a progress bar is displayed > before continuing (which is a current issue for the RPi3 platform). > > Signed-off-by: Pete Batard > --- > MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c > index f3d5e5ac0615..7968a58f3454 100644 > --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c > +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c > @@ -341,6 +341,7 @@ BdsWait ( > TimeoutRemain--; > } > } > + PlatformBootManagerWaitCallback (0); > DEBUG ((EFI_D_INFO, "[Bds]Exit the waiting!\n")); > } > > I can confirm the problem statement, from a quick test with OVMF. Regarding the PlatformBootManagerWaitCallback (0) call, it promises to do the right thing, considering the following library instances: - ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c - OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c In both cases, the function goes, VOID EFIAPI PlatformBootManagerWaitCallback ( UINT16 TimeoutRemain ) { EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black; EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White; UINT16 Timeout; Timeout = PcdGet16 (PcdPlatformBootTimeOut); Black.Raw = 0x00000000; White.Raw = 0x00FFFFFF; BootLogoUpdateProgress ( White.Pixel, Black.Pixel, L"Start boot option", White.Pixel, (Timeout - TimeoutRemain) * 100 / Timeout, 0 ); } If we substitute 0 for TimeoutRemain in the BootLogoUpdateProgress() call, we get (Timeout * 100 / Timeout), i.e. 100%. I haven't tested the patch, and I can't review it quickly for real, but it looks plausible to me. Thanks Laszlo