From: "Jeff Brasen" <jbrasen@nvidia.com>
To: <devel@edk2.groups.io>
Cc: <ardb+tianocore@kernel.org>, <michael.d.kinney@intel.com>,
<jordan.l.justen@intel.com>, <gaoliming@byosoft.com.cn>,
<zhiguang.liu@intel.com>, Jeff Brasen <jbrasen@nvidia.com>
Subject: [PATCH v3 2/2] MdePkg: add definition of LINUX_EFI_INITRD_MEDIA_GUID
Date: Wed, 4 Aug 2021 16:03:19 -0600 [thread overview]
Message-ID: <1f492ab4a4b791058d882bf68adfaef122ea005d.1628114324.git.jbrasen@nvidia.com> (raw)
In-Reply-To: <cover.1628114324.git.jbrasen@nvidia.com>
Add LINUX_EFI_INITRD_MEDIA_GUID to our collection of GUID definitions,
it can be used in a media device path to specify a Linux style initrd
that can be loaded by the OS using the LoadFile2 protocol.
Move these defines to MdePkg from OvmfPkg as these are relevant to
non-OVMF targets as well.
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2564
Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Ard Biesheuvel <mailto:ardb@kernel.org>
---
MdePkg/MdePkg.dec | 5 ++++
MdePkg/Include/Guid/LinuxEfiInitrdMedia.h | 31 +++++++++++++++++++++++
2 files changed, 36 insertions(+)
create mode 100644 MdePkg/Include/Guid/LinuxEfiInitrdMedia.h
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index c5319fdd71ca..a28a2daaffa8 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -818,6 +818,11 @@ [Guids]
#
gTianoCustomDecompressGuid = { 0xA31280AD, 0x481E, 0x41B6, { 0x95, 0xE8, 0x12, 0x7F, 0x4C, 0x98, 0x47, 0x79 }}
+ #
+ # GUID used to provide initrd to linux via LoadFile2 protocol
+ #
+ gLinuxEfiInitrdMediaGuid = {0x5568e427, 0x68fc, 0x4f3d, {0xac, 0x74, 0xca, 0x55, 0x52, 0x31, 0xcc, 0x68}}
+
[Guids.IA32, Guids.X64]
## Include/Guid/Cper.h
gEfiIa32X64ErrorTypeCacheCheckGuid = { 0xA55701F5, 0xE3EF, 0x43de, { 0xAC, 0x72, 0x24, 0x9B, 0x57, 0x3F, 0xAD, 0x2C }}
diff --git a/MdePkg/Include/Guid/LinuxEfiInitrdMedia.h b/MdePkg/Include/Guid/LinuxEfiInitrdMedia.h
new file mode 100644
index 000000000000..0e7db8bd8140
--- /dev/null
+++ b/MdePkg/Include/Guid/LinuxEfiInitrdMedia.h
@@ -0,0 +1,31 @@
+/** @file
+ GUID definition for the Linux Initrd media device path
+
+ Linux distro boot generally relies on an initial ramdisk (initrd)
+ which is provided by the loader, and which contains additional kernel
+ modules (for storage and network, for instance), and the initial user
+ space startup code, i.e., the code which brings up the user space side
+ of the entire OS.
+
+ In order to provide a standard method to locate this file,
+ the GUID defined in this file is used to describe the device path
+ for a LoadFile2 Protocol instance that is responsible for loading the initrd file.
+
+ The kernel EFI Stub will locate and use this instance to load the initrd,
+ therefore the firmware/loader should install an instance of this to load the
+ relevant initrd.
+
+ Copyright (c) 2020, Arm, Ltd. All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef LINUX_EFI_INITRD_MEDIA_GUID_H__
+#define LINUX_EFI_INITRD_MEDIA_GUID_H__
+
+#define LINUX_EFI_INITRD_MEDIA_GUID \
+ {0x5568e427, 0x68fc, 0x4f3d, {0xac, 0x74, 0xca, 0x55, 0x52, 0x31, 0xcc, 0x68}}
+
+extern EFI_GUID gLinuxEfiInitrdMediaGuid;
+
+#endif
--
2.25.1
next prev parent reply other threads:[~2021-08-04 22:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-04 22:02 [PATCH v3 0/2] Relocate LINUX_EFI_INITRD_MEDIA_GUID to MdePkg Jeff Brasen
2021-08-04 22:03 ` [PATCH v3 1/2] OvmfPkg: Remove Initrd LINUX_EFI_INITRD_MEDIA_GUID Jeff Brasen
2021-08-04 22:03 ` Jeff Brasen [this message]
2021-08-06 9:08 ` [PATCH v3 0/2] Relocate LINUX_EFI_INITRD_MEDIA_GUID to MdePkg 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-list 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=1f492ab4a4b791058d882bf68adfaef122ea005d.1628114324.git.jbrasen@nvidia.com \
--to=devel@edk2.groups.io \
/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