efi: Add generic magic number in header
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest2 patches 10 repliesIn review
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | efi: libstub: Always enable initrd command line loader and bump versiondrivers/ drivers/ include/ | +2 | 0 replies | |
| 2/2 | efi: Put Linux specific magic number in the DOS headerarch/ arch/ drivers/ +1 more | +13 | 9 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Leif Lindholm | Daniel Kiper |
|---|---|---|
| Series | A-b | |
| 1/2 | ||
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/2] efi: Add generic magic number in header
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.
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(-)
Signature · 1 line
2.35.1