Commit dc235d62 authored by Ard Biesheuvel's avatar Ard Biesheuvel
Browse files

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: default avatarArd Biesheuvel <ardb@kernel.org>
parent 148d3f71
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
@@ -10,7 +10,25 @@

#include <linux/types.h>

#define LINUX_EFISTUB_MAJOR_VERSION		0x0
/*
 * Linux EFI stub v1.0 adds the following functionality:
 * - Loading initrd from the LINUX_EFI_INITRD_MEDIA_GUID device path,
 * - Loading/starting the kernel from firmware that targets a different
 *   machine type, via the entrypoint exposed in the .compat PE/COFF section.
 *
 * The recommended way of loading and starting v1.0 or later kernels is to use
 * the LoadImage() and StartImage() EFI boot services, and expose the initrd
 * via the LINUX_EFI_INITRD_MEDIA_GUID device path.
 *
 * Versions older than v1.0 support initrd loading via the image load options
 * (using initrd=, limited to the volume from which the kernel itself was
 * loaded), or via arch specific means (bootparams, DT, etc).
 *
 * On x86, LoadImage() and StartImage() can be omitted if the EFI handover
 * protocol is implemented, which can be inferred from the version,
 * handover_offset and xloadflags fields in the bootparams structure.
 */
#define LINUX_EFISTUB_MAJOR_VERSION		0x1
#define LINUX_EFISTUB_MINOR_VERSION		0x0

#define MZ_MAGIC	0x5a4d	/* "MZ" */