[edk2-devel] [PATCH 1/1] MdeModulePkg/BdsDxe: Also call PlatformBootManagerWaitCallback on 0
Laszlo Ersek
lersek at redhat.com
Thu Sep 26 19:30:14 UTC 2019
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 <pete at akeo.ie>
> ---
> 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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#48133): https://edk2.groups.io/g/devel/message/48133
Mute This Topic: https://groups.io/mt/34288971/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list