[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXEfvx+jDv_6OfHd1uM-TUe0RkdR7JO1NnKbzcvLRpOQbA@mail.gmail.com>
Date: Mon, 3 Nov 2025 11:41:03 +0100
From: Ard Biesheuvel <ardb@...nel.org>
To: Francesco Pompò <francescopompo2@...il.com>
Cc: linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] efistub/smbios: Add fallback for SMBIOS record lookup
On Mon, 3 Nov 2025 at 11:15, Francesco Pompò <francescopompo2@...il.com> wrote:
>
> Il giorno lun 3 nov 2025 alle ore 09:19 Ard Biesheuvel
> <ardb@...nel.org> ha scritto:
> >
> > Hello Francesco,
> >
> > On Sun, 2 Nov 2025 at 01:14, Francesco Pompo <francescopompo2@...il.com> wrote:
> > >
> > > Some UEFI firmware implementations do not provide the SMBIOS Protocol,
> > > causing efi_get_smbios_record() to fail. This prevents retrieval of
> > > system information such as product name, which is needed by
> > > apple_set_os() to enable the integrated GPU on dual-graphics Intel
> > > MacBooks.
> > >
> > > Add a fallback that directly parses the SMBIOS entry point table when
> > > the protocol is unavailable. Log when the fallback is used.
> > >
> > > Signed-off-by: Francesco Pompo <francescopompo2@...il.com>
> > > ---
> > > drivers/firmware/efi/libstub/efistub.h | 17 +++++
> > > drivers/firmware/efi/libstub/smbios.c | 99 +++++++++++++++++++++++++-
> > > 2 files changed, 113 insertions(+), 3 deletions(-)
> > >
> >
> > On which platform does this fix an actual existing issue?
>
> Hello Ard,
>
> My Macbook Pro Late 2013, product name Macbook11,3 is affected.
> Specifically at least the firmware version 478.0.0.0.0, released on
> 01/13/2023. I have no way to downgrade to check for other versions.
>
> From what I have read on internet this should not be the only model to
> be affected.
>
> The issue is that apple_match_product_name() fails to obtain its info
> via efi_get_smbios_record() and makes apple_set_os() fail too.
>
Fair enough.
But please move get_table_record() into x86-stub.c and call it
directly from apple_match_product_name() if the call to
efi_get_smbios_record() returns NULL. That way, the fallback is only
used where we know it is needed, and we don't go down this direct
path, e.g., on random arm64 boxes.
Also, struct smbios_entry_point can be moved into the .c file, as it
is not used anywhere else. And you can drop the __packed, I think - if
it is needed for alignment, you can use __aligned(1) instead (but all
the fields seem to be naturally aligned afaict)
Powered by blists - more mailing lists