linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: linux-efi@vger.kernel.org
Cc: Ard Biesheuvel <ardb@kernel.org>,
	lersek@redhat.com, leif@nuviainc.com, pjones@redhat.com,
	mjg59@google.com, agraf@csgraf.de, ilias.apalodimas@linaro.org,
	xypron.glpk@gmx.de, daniel.kiper@oracle.com,
	nivedita@alum.mit.edu, James.Bottomley@hansenpartnership.com
Subject: [RFC PATCH 3/3] efi: Bump the Linux EFI stub major version number to #1
Date: Thu, 20 Feb 2020 12:06:49 +0100	[thread overview]
Message-ID: <20200220110649.1303-4-ardb@kernel.org> (raw)
In-Reply-To: <20200220110649.1303-1-ardb@kernel.org>

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>
---
 include/linux/pe.h | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

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" */
-- 
2.17.1


  parent reply	other threads:[~2020-02-20 11:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 11:06 [RFC PATCH 0/3] efi: put an API version number in the PE/COFF header Ard Biesheuvel
2020-02-20 11:06 ` [RFC PATCH 1/3] efi/x86: Use symbolic constants in PE header instead of bare numbers Ard Biesheuvel
2020-02-20 17:28   ` Arvind Sankar
2020-02-20 17:32     ` Ard Biesheuvel
2020-02-20 18:04       ` Arvind Sankar
2020-02-20 18:11         ` Arvind Sankar
2020-02-20 18:14         ` Ard Biesheuvel
2020-02-20 19:33           ` Arvind Sankar
2020-02-20 19:51       ` Arvind Sankar
2020-02-20 21:22         ` Ard Biesheuvel
2020-02-20 22:04           ` Arvind Sankar
2020-02-20 11:06 ` [RFC PATCH 2/3] efi/libstub: Introduce symbolic constants for the stub major/minor version Ard Biesheuvel
2020-02-20 11:06 ` Ard Biesheuvel [this message]
2020-02-20 13:53 ` [RFC PATCH 0/3] efi: put an API version number in the PE/COFF header Daniel Kiper
2020-02-20 14:55 ` Heinrich Schuchardt
2020-02-20 19:29   ` Ard Biesheuvel

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=20200220110649.1303-4-ardb@kernel.org \
    --to=ardb@kernel.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=agraf@csgraf.de \
    --cc=daniel.kiper@oracle.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=leif@nuviainc.com \
    --cc=lersek@redhat.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=mjg59@google.com \
    --cc=nivedita@alum.mit.edu \
    --cc=pjones@redhat.com \
    --cc=xypron.glpk@gmx.de \
    /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;
as well as URLs for NNTP newsgroup(s).