aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-02-20 11:57:20 +0100
committerArd Biesheuvel <ardb@kernel.org>2020-02-23 21:59:42 +0100
commitdc235d62fc60a6549238eda7ff29769457fe5663 (patch)
tree5d6c21c1b23f0a07152a3e8e1e0c4ece2769425d
parentefi/libstub: Introduce symbolic constants for the stub major/minor version (diff)
downloadlinux-dev-dc235d62fc60a6549238eda7ff29769457fe5663.tar.xz
linux-dev-dc235d62fc60a6549238eda7ff29769457fe5663.zip
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>
-rw-r--r--include/linux/pe.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/linux/pe.h b/include/linux/pe.h
index e0869f3eadd6..8ad71d763a77 100644
--- a/include/linux/pe.h
+++ b/include/linux/pe.h
@@ -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" */