From: Ard Biesheuvel <ardb@kernel.org>
To: linux-efi@vger.kernel.org
Cc: grub-devel@gnu.org, Ard Biesheuvel <ardb@kernel.org>,
Huacai Chen <chenhuacai@kernel.org>,
Atish Patra <atishp@rivosinc.com>,
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
Daniel Kiper <daniel.kiper@oracle.com>,
Leif Lindholm <quic_llindhol@quicinc.com>
Subject: [PATCH v2 0/2] efi: Add generic magic number in header
Date: Tue, 29 Nov 2022 18:56:14 +0100 [thread overview]
Message-ID: <20221129175616.2089294-1-ardb@kernel.org> (raw)
This is a minimal respin of the RFC patch I sent out a few week ago. No
changes were applied except the /0x30/0x38 typo fix and some additional
wording in the commit log. I also added a patch to make the command line
initrd loader always built-in.
The purpose of all of this is to create *and document* a common baseline
for EFI booting of Linux. (I know I promised some documentation myself,
but I simply don't have time for that, so if anyone feels so inclined,
please go ahead).
The idea is that EFI images with the LINUX_PE_MAGIC number are
guaranteed to support:
- initrd loading via LoadFile2
- initrd loading via the command line
- (on x86) mixed mode boot via the .compat entry point
- other things I missed?
Architectures such as arm64 and RISC-V already have their own magic
numbers, in which case the PE/COFF major/minor image version should be
inspected, where 1.1 corresponds with the set described above.
If other architectures want to create hybrid images as well, it would be
better to use a different offset to store the magic number, so that the
generic EFI one can be carried as well. The reason for deviating from
this for arm64 and RISC-V is the simple fact that existing images
already exist, so for those architectures, we have to consider both
anyway.
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Atish Patra <atishp@rivosinc.com>
Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Cc: Daniel Kiper <daniel.kiper@oracle.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Ard Biesheuvel (2):
efi: libstub: Always enable initrd command line loader and bump
version
efi: Put Linux specific magic number in the DOS header
arch/loongarch/kernel/head.S | 3 ++-
arch/x86/boot/header.S | 3 ++-
drivers/firmware/efi/Kconfig | 15 ---------------
drivers/firmware/efi/libstub/efi-stub-helper.c | 3 +--
drivers/firmware/efi/libstub/zboot-header.S | 3 ++-
include/linux/pe.h | 9 ++++++++-
6 files changed, 15 insertions(+), 21 deletions(-)
--
2.35.1
next reply other threads:[~2022-11-29 17:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 17:56 Ard Biesheuvel [this message]
2022-11-29 17:56 ` [PATCH v2 1/2] efi: libstub: Always enable initrd command line loader and bump version Ard Biesheuvel
2022-11-29 17:56 ` [PATCH v2 2/2] efi: Put Linux specific magic number in the DOS header Ard Biesheuvel
2022-12-01 14:29 ` Daniel Kiper
2022-12-01 14:48 ` Ard Biesheuvel
2022-12-01 14:58 ` Daniel Kiper
2022-12-01 19:25 ` Daniel Kiper
2022-12-06 9:52 ` Atish Patra
2022-12-07 7:51 ` Xiaotian Wu
2022-12-07 8:06 ` Ard Biesheuvel
2022-12-07 10:35 ` Xiaotian Wu
2022-12-07 14:06 ` Ard Biesheuvel
2022-11-29 19:58 ` [PATCH v2 0/2] efi: Add generic magic number in header Leif Lindholm
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=20221129175616.2089294-1-ardb@kernel.org \
--to=ardb@kernel.org \
--cc=atishp@rivosinc.com \
--cc=chenhuacai@kernel.org \
--cc=daniel.kiper@oracle.com \
--cc=grub-devel@gnu.org \
--cc=heinrich.schuchardt@canonical.com \
--cc=linux-efi@vger.kernel.org \
--cc=quic_llindhol@quicinc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox