From: Lukas Wunner <lukas@wunner.de>
To: Aditya Garg <gargaditya08@live.com>
Cc: Ard Biesheuvel <ardb@kernel.org>,
Hans de Goede <hdegoede@redhat.com>,
"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Orlando Chamberlain <orlandoch.dev@gmail.com>,
Kerem Karabay <kekrby@gmail.com>
Subject: Re: [PATCH] efi: libstub: add support for the apple_set_os protocol
Date: Sun, 30 Jun 2024 12:22:41 +0200 [thread overview]
Message-ID: <ZoEx8S0_eUDM6Cjq@wunner.de> (raw)
In-Reply-To: <EBE51900-DA87-4113-B389-80B9C9160F0F@live.com>
On Sun, Jun 30, 2024 at 04:42:55AM +0000, Aditya Garg wrote:
> +struct apple_set_os_protocol {
> + u64 version;
> + efi_status_t (__efiapi *set_os_version) (const char *);
> + efi_status_t (__efiapi *set_os_vendor) (const char *);
> + struct {
> + u32 version;
> + u32 set_os_version;
> + u32 set_os_vendor;
> + } mixed_mode;
> +};
Only the very first MacBooks that shipped in 2006 used a 32-bit EFI.
We don't need to call apple_set_os on those, so just get rid of the
mixed_mode portion of this struct and then ...
> @@ -321,6 +345,9 @@ static void setup_quirks(struct boot_params *boot_params)
> if (IS_ENABLED(CONFIG_APPLE_PROPERTIES) &&
> !memcmp(efistub_fw_vendor(), apple, sizeof(apple)))
> retrieve_apple_device_properties(boot_params);
> +
> + if (efi_apple_set_os)
> + apple_set_os();
> }
... make the call to apple_set_os() conditional on:
if (efi_is_64bit() &&
!memcmp(efistub_fw_vendor(), apple, sizeof(apple)))
We don't want to call this on non-Apple hardware if we can help it.
Thanks,
Lukas
prev parent reply other threads:[~2024-06-30 10:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-30 4:42 [PATCH] efi: libstub: add support for the apple_set_os protocol Aditya Garg
2024-06-30 8:04 ` Lukas Wunner
2024-06-30 9:13 ` Aditya Garg
2024-06-30 10:02 ` Lukas Wunner
2024-06-30 10:50 ` Aditya Garg
2024-06-30 11:04 ` Orlando Chamberlain
2024-06-30 11:25 ` Aditya Garg
2024-06-30 11:27 ` Aditya Garg
2024-06-30 11:29 ` Ard Biesheuvel
2024-06-30 11:56 ` Aditya Garg
2024-06-30 12:58 ` Ard Biesheuvel
2024-06-30 19:18 ` Aditya Garg
2024-06-30 12:09 ` Aditya Garg
2024-06-30 10:22 ` Lukas Wunner [this message]
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=ZoEx8S0_eUDM6Cjq@wunner.de \
--to=lukas@wunner.de \
--cc=ardb@kernel.org \
--cc=gargaditya08@live.com \
--cc=hdegoede@redhat.com \
--cc=kekrby@gmail.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=orlandoch.dev@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.