From: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
To: "Môshe van der Sterre" <me-A/3C56C7qwM@public.gmane.org>
Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org,
Matthew Garrett <mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
Subject: Re: [PATCH] x86/efi-bgrt: Don't ignore the BGRT if the 'valid' bit is 0
Date: Tue, 5 Jan 2016 15:46:40 +0000 [thread overview]
Message-ID: <20160105154640.GB2714@codeblueprint.co.uk> (raw)
In-Reply-To: <1450648391-4631-1-git-send-email-me-A/3C56C7qwM@public.gmane.org>
On Sun, 20 Dec, at 10:53:11PM, Môshe van der Sterre wrote:
> Unintuitively, the BGRT graphic is apparently meant to be usable if
> the valid bit in not set. The valid bit only conveys uncertainty
> about the validity in relation to the screen state.
>
> Windows 10 actually uses the BGRT image for its boot screen even if
> not 'valid', for example when the user triggered the boot menu.
> Because it is unclear if all firmwares will provide a usable graphic
> in this case, we now look at the BMP magic number as an additional
> check.
> ---
> arch/x86/platform/efi/efi-bgrt.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/platform/efi/efi-bgrt.c b/arch/x86/platform/efi/efi-bgrt.c
> index b097066..a243381 100644
> --- a/arch/x86/platform/efi/efi-bgrt.c
> +++ b/arch/x86/platform/efi/efi-bgrt.c
> @@ -57,11 +57,6 @@ void __init efi_bgrt_init(void)
> bgrt_tab->status);
> return;
> }
> - if (bgrt_tab->status != 1) {
> - pr_debug("Ignoring BGRT: invalid status %u (expected 1)\n",
> - bgrt_tab->status);
> - return;
> - }
> if (bgrt_tab->image_type != 0) {
> pr_err("Ignoring BGRT: invalid image type %u (expected 0)\n",
> bgrt_tab->image_type);
> @@ -80,6 +75,11 @@ void __init efi_bgrt_init(void)
>
> memcpy(&bmp_header, image, sizeof(bmp_header));
> memunmap(image);
> + if (bmp_header.id != 0x4d42) {
> + pr_err("Ignoring BGRT: Incorrect BMP magic number 0x%x (expected 0x4d42)\n",
> + bmp_header.id);
> + return;
> + }
> bgrt_image_size = bmp_header.size;
>
> bgrt_image = kmalloc(bgrt_image_size, GFP_KERNEL | __GFP_NOWARN);
Shouldn't this be pr_debug() instead of pr_err()?
next prev parent reply other threads:[~2016-01-05 15:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-20 21:53 [PATCH] x86/efi-bgrt: Don't ignore the BGRT if the 'valid' bit is 0 Môshe van der Sterre
[not found] ` <1450648391-4631-1-git-send-email-me-A/3C56C7qwM@public.gmane.org>
2016-01-05 15:46 ` Matt Fleming [this message]
[not found] ` <20160105154640.GB2714-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-01-05 16:38 ` Môshe van der Sterre
[not found] ` <568BF19E.3040701-A/3C56C7qwM@public.gmane.org>
2016-01-08 11:30 ` Matt Fleming
[not found] ` <20160108113047.GD2532-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-01-08 11:42 ` Matt Fleming
[not found] ` <20160108114235.GE2532-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-01-14 12:29 ` Matt Fleming
[not found] ` <20160114122945.GB3602-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-01-14 12:31 ` Môshe van der Sterre
2016-01-08 18:09 ` Josh Triplett
[not found] <1452809107-17779-1-git-send-email-me@moshe.nl>
[not found] ` <1452809107-17779-1-git-send-email-me-A/3C56C7qwM@public.gmane.org>
2016-01-18 21:08 ` Matt Fleming
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-all 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=20160105154640.GB2714@codeblueprint.co.uk \
--to=matt-mf/unelci9gs6ibeejttw/xrex20p6io@public.gmane.org \
--cc=josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=me-A/3C56C7qwM@public.gmane.org \
--cc=mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.