Re: [PATCH 08/10] efi/x86: Move EFI BGRT init code to early init code

From: Sabrina Dubroca
Date: Mon May 15 2017 - 09:44:39 EST


2017-05-15, 21:18:35 +0800, Dave Young wrote:
> On 05/15/17 at 01:10pm, Sabrina Dubroca wrote:
> > 2017-05-15, 16:37:40 +0800, Dave Young wrote:
> > > diff --git a/arch/x86/platform/efi/efi-bgrt.c b/arch/x86/platform/efi/efi-bgrt.c
> > > index 04ca876..b986e26 100644
> > > --- a/arch/x86/platform/efi/efi-bgrt.c
> > > +++ b/arch/x86/platform/efi/efi-bgrt.c
> > > @@ -36,6 +36,9 @@ void __init efi_bgrt_init(struct acpi_table_header *table)
> > > if (acpi_disabled)
> > > return;
> > >
> > > + if (!efi_enabled(EFI_CONFIG_TABLES))
>
> A better version should be checking EFI_BOOT, could you retest with
> below instead? If it works I can send a patch with your Tested-by:
> if (!efi_enabled(EFI_BOOT))

Yes, that works. Thanks for the fix :)

> > > + return;
> > > +
> > > if (table->length < sizeof(bgrt_tab)) {
> > > pr_notice("Ignoring BGRT: invalid length %u (expected %zu)\n",
> > > table->length, sizeof(bgrt_tab));
> > >
> >
> > --
> > Sabrina
>
> Thanks
> Dave

--
Sabrina