[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260125001111.1269-2-atharvatiwarilinuxdev@gmail.com>
Date: Sun, 25 Jan 2026 00:11:00 +0000
From: Atharva Tiwari <atharvatiwarilinuxdev@...il.com>
To:
Cc: Atharva Tiwari <atharvatiwarilinuxdev@...il.com>,
Ard Biesheuvel <ardb@...nel.org>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Tvrtko Ursulin <tursulin@...ulin.net>,
David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>,
Javier Martinez Canillas <javierm@...hat.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
Ingo Molnar <mingo@...nel.org>,
"Borislav Petkov (AMD)" <bp@...en8.de>,
Francesco Pompo <francescopompo2@...il.com>,
Lenny Szubowicz <lszubowi@...hat.com>,
linux-efi@...r.kernel.org,
linux-kernel@...r.kernel.org,
intel-gfx@...ts.freedesktop.org,
intel-xe@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org
Subject: [PATCH 1/2] efi/libstub: Enable apple-set-os for all Apple Devices
Enable apple-set-os on all macs, as
apple-set-os is needed to use eGPUs and the iGPU.
(tested on iMac20,1)
Signed-off-by: Atharva Tiwari <atharvatiwarilinuxdev@...il.com>
---
drivers/firmware/efi/libstub/x86-stub.c | 22 +++++-----------------
1 file changed, 5 insertions(+), 17 deletions(-)
diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index cef32e2c82d8..60e1a41bfe5f 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -303,32 +303,20 @@ static const struct efi_smbios_record *get_table_record(u8 type)
static bool apple_match_product_name(void)
{
- static const char type1_product_matches[][15] = {
- "MacBookPro11,3",
- "MacBookPro11,5",
- "MacBookPro13,3",
- "MacBookPro14,3",
- "MacBookPro15,1",
- "MacBookPro15,3",
- "MacBookPro16,1",
- "MacBookPro16,4",
- };
const struct efi_smbios_type1_record *record;
- const u8 *product;
+ const u8 *vendor;
record = (struct efi_smbios_type1_record *)
(efi_get_smbios_record(1) ?: get_table_record(1));
if (!record)
return false;
- product = efi_get_smbios_string(record, product_name);
- if (!product)
+ vendor = efi_get_smbios_string(record, manufacturer);
+ if (!vendor)
return false;
- for (int i = 0; i < ARRAY_SIZE(type1_product_matches); i++) {
- if (!strcmp(product, type1_product_matches[i]))
- return true;
- }
+ if (!strcmp(vendor, "Apple Inc."))
+ return true;
return false;
}
--
2.43.0
Powered by blists - more mailing lists