Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

efi: Bump the Linux EFI stub major version number to #1

Now that we have introduced new, generic ways for the OS loader to
interface with Linux kernels during boot, we need to record this
fact in a way that allows loaders to discover this information, and
fall back to the existing methods for older kernels.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

+19 -1
+19 -1
include/linux/pe.h
··· 10 10 11 11 #include <linux/types.h> 12 12 13 - #define LINUX_EFISTUB_MAJOR_VERSION 0x0 13 + /* 14 + * Linux EFI stub v1.0 adds the following functionality: 15 + * - Loading initrd from the LINUX_EFI_INITRD_MEDIA_GUID device path, 16 + * - Loading/starting the kernel from firmware that targets a different 17 + * machine type, via the entrypoint exposed in the .compat PE/COFF section. 18 + * 19 + * The recommended way of loading and starting v1.0 or later kernels is to use 20 + * the LoadImage() and StartImage() EFI boot services, and expose the initrd 21 + * via the LINUX_EFI_INITRD_MEDIA_GUID device path. 22 + * 23 + * Versions older than v1.0 support initrd loading via the image load options 24 + * (using initrd=, limited to the volume from which the kernel itself was 25 + * loaded), or via arch specific means (bootparams, DT, etc). 26 + * 27 + * On x86, LoadImage() and StartImage() can be omitted if the EFI handover 28 + * protocol is implemented, which can be inferred from the version, 29 + * handover_offset and xloadflags fields in the bootparams structure. 30 + */ 31 + #define LINUX_EFISTUB_MAJOR_VERSION 0x1 14 32 #define LINUX_EFISTUB_MINOR_VERSION 0x0 15 33 16 34 #define MZ_MAGIC 0x5a4d /* "MZ" */