From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, pete@akeo.ie
Cc: zhichao.gao@intel.com, ray.ni@intel.com
Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/BdsDxe: Also call PlatformBootManagerWaitCallback on 0
Date: Thu, 26 Sep 2019 21:30:14 +0200 [thread overview]
Message-ID: <8bacbb53-98df-724e-b704-b5059d11e378@redhat.com> (raw)
In-Reply-To: <20190925155005.12532-1-pete@akeo.ie>
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@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
next prev parent reply other threads:[~2019-09-26 19:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 15:50 [PATCH 1/1] MdeModulePkg/BdsDxe: Also call PlatformBootManagerWaitCallback on 0 Pete Batard
2019-09-26 19:30 ` Laszlo Ersek [this message]
2019-09-29 7:39 ` [edk2-devel] " Liming Gao
2019-09-30 1:24 ` Ni, Ray
2019-09-30 23:12 ` Laszlo Ersek
2019-10-08 14:11 ` 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=8bacbb53-98df-724e-b704-b5059d11e378@redhat.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