linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] efi/bgrt: Drop BGRT status field reserved bits check
@ 2019-05-29 13:28 Hans de Goede
  2019-06-10 15:12 ` Ard Biesheuvel
  0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2019-05-29 13:28 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: Hans de Goede, linux-efi

Starting with ACPI 6.2 bits 1 and 2 of the BGRT status field are no longer
reserved. These bits are now used to indicate if the image needs to be
rotated before being displayed.

The first device using these bits has now shown up (the GPD MicroPC) and
the reserved bits check causes us to reject the valid BGRT table on this
device.

Rather then changing the reserved bits check, allowing only the 2 new bits,
instead just completely remove it so that we do not end up with a similar
problem when more bits are added in the future.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/firmware/efi/efi-bgrt.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/firmware/efi/efi-bgrt.c b/drivers/firmware/efi/efi-bgrt.c
index a2384184a7de..b07c17643210 100644
--- a/drivers/firmware/efi/efi-bgrt.c
+++ b/drivers/firmware/efi/efi-bgrt.c
@@ -47,11 +47,6 @@ void __init efi_bgrt_init(struct acpi_table_header *table)
 		       bgrt->version);
 		goto out;
 	}
-	if (bgrt->status & 0xfe) {
-		pr_notice("Ignoring BGRT: reserved status bits are non-zero %u\n",
-		       bgrt->status);
-		goto out;
-	}
 	if (bgrt->image_type != 0) {
 		pr_notice("Ignoring BGRT: invalid image type %u (expected 0)\n",
 		       bgrt->image_type);
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] efi/bgrt: Drop BGRT status field reserved bits check
  2019-05-29 13:28 [PATCH] efi/bgrt: Drop BGRT status field reserved bits check Hans de Goede
@ 2019-06-10 15:12 ` Ard Biesheuvel
  0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2019-06-10 15:12 UTC (permalink / raw)
  To: Hans de Goede; +Cc: linux-efi

On Wed, 29 May 2019 at 15:28, Hans de Goede <hdegoede@redhat.com> wrote:
>
> Starting with ACPI 6.2 bits 1 and 2 of the BGRT status field are no longer
> reserved. These bits are now used to indicate if the image needs to be
> rotated before being displayed.
>
> The first device using these bits has now shown up (the GPD MicroPC) and
> the reserved bits check causes us to reject the valid BGRT table on this
> device.
>
> Rather then changing the reserved bits check, allowing only the 2 new bits,
> instead just completely remove it so that we do not end up with a similar
> problem when more bits are added in the future.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Thanks, Hans. I'll take this as a fix.

> ---
>  drivers/firmware/efi/efi-bgrt.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/drivers/firmware/efi/efi-bgrt.c b/drivers/firmware/efi/efi-bgrt.c
> index a2384184a7de..b07c17643210 100644
> --- a/drivers/firmware/efi/efi-bgrt.c
> +++ b/drivers/firmware/efi/efi-bgrt.c
> @@ -47,11 +47,6 @@ void __init efi_bgrt_init(struct acpi_table_header *table)
>                        bgrt->version);
>                 goto out;
>         }
> -       if (bgrt->status & 0xfe) {
> -               pr_notice("Ignoring BGRT: reserved status bits are non-zero %u\n",
> -                      bgrt->status);
> -               goto out;
> -       }
>         if (bgrt->image_type != 0) {
>                 pr_notice("Ignoring BGRT: invalid image type %u (expected 0)\n",
>                        bgrt->image_type);
> --
> 2.21.0
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-10 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 13:28 [PATCH] efi/bgrt: Drop BGRT status field reserved bits check Hans de Goede
2019-06-10 15:12 ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).