From: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>
Cc: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>,
Ard Biesheuvel <ardb@kernel.org>,
Jani Nikula <jani.nikula@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Javier Martinez Canillas <javierm@redhat.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
Lenny Szubowicz <lszubowi@redhat.com>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
Francesco Pompo <francescopompo2@gmail.com>,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Subject: [PATCH v3 1/2] efi/libstub: Enable apple-set-os for most apple devices
Date: Tue, 3 Feb 2026 07:31:17 +0000 [thread overview]
Message-ID: <20260203073130.1111-2-atharvatiwarilinuxdev@gmail.com> (raw)
In-Reply-To: <20260203073130.1111-1-atharvatiwarilinuxdev@gmail.com>
Enable apple-set-os on Apple Mac systems by default.
Exclude MacBook6,2 and MacBookAir7,2, as enabling apple-set-os on
these models causes regressions.
(tested on iMac20,1)
Signed-off-by: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>
---
drivers/firmware/efi/libstub/x86-stub.c | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index cef32e2c82d8..532a713adef5 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -303,15 +303,9 @@ 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",
+ static const char disabled_product_matches[][14] = {
+ "MacBookPro6,2",
+ "MacBookPro7,2",
};
const struct efi_smbios_type1_record *record;
const u8 *product;
@@ -325,12 +319,12 @@ static bool apple_match_product_name(void)
if (!product)
return false;
- for (int i = 0; i < ARRAY_SIZE(type1_product_matches); i++) {
- if (!strcmp(product, type1_product_matches[i]))
- return true;
+ for (int i = 0; i < ARRAY_SIZE(disabled_product_matches); i++) {
+ if (!strcmp(product, disabled_product_matches[i]))
+ return false;
}
- return false;
+ return true;
}
static void apple_set_os(void)
--
2.43.0
next prev parent reply other threads:[~2026-02-03 7:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 7:31 [PATCH v3 0/2] Add support for eGPUs on Apple Products Atharva Tiwari
2026-02-03 7:31 ` Atharva Tiwari [this message]
2026-02-03 7:31 ` [PATCH v3 2/2] drm/i915/display: Disable display for iMac's Atharva Tiwari
2026-02-03 11:09 ` Jani Nikula
2026-02-03 11:12 ` Ard Biesheuvel
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=20260203073130.1111-2-atharvatiwarilinuxdev@gmail.com \
--to=atharvatiwarilinuxdev@gmail.com \
--cc=airlied@gmail.com \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=francescopompo2@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=javierm@redhat.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lszubowi@redhat.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=tursulin@ursulin.net \
--cc=tzimmermann@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox