]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: add definition of LINUX_EFI_INITRD_MEDIA_GUID
authorJeff Brasen <jbrasen@nvidia.com>
Wed, 4 Aug 2021 22:03:19 +0000 (16:03 -0600)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 5 Aug 2021 21:35:47 +0000 (21:35 +0000)
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 <ardb@kernel.org>
MdePkg/Include/Guid/LinuxEfiInitrdMedia.h [new file with mode: 0644]
MdePkg/MdePkg.dec

diff --git a/MdePkg/Include/Guid/LinuxEfiInitrdMedia.h b/MdePkg/Include/Guid/LinuxEfiInitrdMedia.h
new file mode 100644 (file)
index 0000000..d436a75
--- /dev/null
@@ -0,0 +1,30 @@
+/** @file\r
+  GUID definition for the Linux Initrd media device path\r
+\r
+  Linux distro boot generally relies on an initial ramdisk (initrd) which is\r
+  provided by the loader, and which contains additional kernel modules (for\r
+  storage and network, for instance), and the initial user space startup code,\r
+  i.e., the code which brings up the user space side of the entire OS.\r
+\r
+  In order to provide a standard method to locate this initrd, the GUID defined\r
+  in this file is used to describe the device path for a LoadFile2 Protocol\r
+  instance that is responsible for loading the initrd file.\r
+\r
+  The kernel EFI Stub will locate and use this instance to load the initrd,\r
+  therefore the firmware/loader should install an instance of this to load the\r
+  relevant initrd.\r
+\r
+  Copyright (c) 2020, Arm, Ltd. All rights reserved.<BR>\r
+\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+**/\r
+\r
+#ifndef LINUX_EFI_INITRD_MEDIA_GUID_H_\r
+#define LINUX_EFI_INITRD_MEDIA_GUID_H_\r
+\r
+#define LINUX_EFI_INITRD_MEDIA_GUID \\r
+  {0x5568e427, 0x68fc, 0x4f3d, {0xac, 0x74, 0xca, 0x55, 0x52, 0x31, 0xcc, 0x68}}\r
+\r
+extern EFI_GUID gLinuxEfiInitrdMediaGuid;\r
+\r
+#endif\r
index c5319fdd71ca1c105abf199233c35c95c0bc7c31..a28a2daaffa8166d41f89d42337e7c8e5b0f65c9 100644 (file)
   #\r
   gTianoCustomDecompressGuid     = { 0xA31280AD, 0x481E, 0x41B6, { 0x95, 0xE8, 0x12, 0x7F, 0x4C, 0x98, 0x47, 0x79 }}\r
 \r
+  #\r
+  # GUID used to provide initrd to linux via LoadFile2 protocol\r
+  #\r
+  gLinuxEfiInitrdMediaGuid       = {0x5568e427, 0x68fc, 0x4f3d, {0xac, 0x74, 0xca, 0x55, 0x52, 0x31, 0xcc, 0x68}}\r
+\r
 [Guids.IA32, Guids.X64]\r
   ## Include/Guid/Cper.h\r
   gEfiIa32X64ErrorTypeCacheCheckGuid = { 0xA55701F5, 0xE3EF, 0x43de, { 0xAC, 0x72, 0x24, 0x9B, 0x57, 0x3F, 0xAD, 0x2C }}\r