]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Add EFI Partition Information Protocol definitions
authorHao Wu <hao.a.wu@intel.com>
Mon, 19 Jun 2017 08:23:33 +0000 (16:23 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 11 Jul 2017 00:42:56 +0000 (08:42 +0800)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
MdePkg/Include/Protocol/PartitionInfo.h [new file with mode: 0644]
MdePkg/MdePkg.dec

diff --git a/MdePkg/Include/Protocol/PartitionInfo.h b/MdePkg/Include/Protocol/PartitionInfo.h
new file mode 100644 (file)
index 0000000..005b1cf
--- /dev/null
@@ -0,0 +1,74 @@
+/** @file\r
+  This file defines the EFI Partition Information Protocol.\r
+\r
+  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+  @par Revision Reference:\r
+  This Protocol is introduced in UEFI Specification 2.7\r
+\r
+**/\r
+\r
+#ifndef __PARTITION_INFO_PROTOCOL_H__\r
+#define __PARTITION_INFO_PROTOCOL_H__\r
+\r
+#include <IndustryStandard/Mbr.h>\r
+#include <Uefi/UefiGpt.h>\r
+\r
+//\r
+// EFI Partition Information Protocol GUID value\r
+//\r
+#define EFI_PARTITION_INFO_PROTOCOL_GUID \\r
+  { 0x8cf2f62c, 0xbc9b, 0x4821, { 0x80, 0x8d, 0xec, 0x9e, 0xc4, 0x21, 0xa1, 0xa0 }};\r
+\r
+\r
+#define EFI_PARTITION_INFO_PROTOCOL_REVISION     0x0001000\r
+#define PARTITION_TYPE_OTHER                     0x00\r
+#define PARTITION_TYPE_MBR                       0x01\r
+#define PARTITION_TYPE_GPT                       0x02\r
+\r
+#pragma pack(1)\r
+\r
+///\r
+/// Partition Information Protocol structure.\r
+///\r
+typedef struct {\r
+  //\r
+  // Set to EFI_PARTITION_INFO_PROTOCOL_REVISION.\r
+  //\r
+  UINT32                     Revision;\r
+  //\r
+  // Partition info type (PARTITION_TYPE_MBR, PARTITION_TYPE_GPT, or PARTITION_TYPE_OTHER).\r
+  //\r
+  UINT32                     Type;\r
+  //\r
+  // If 1, partition describes an EFI System Partition.\r
+  //\r
+  UINT8                      System;\r
+  UINT8                      Reserved[7];\r
+  union {\r
+    ///\r
+    /// MBR data\r
+    ///\r
+    MBR_PARTITION_RECORD     Mbr;\r
+    ///\r
+    /// GPT data\r
+    ///\r
+    EFI_PARTITION_ENTRY      Gpt;\r
+  } Info;\r
+} EFI_PARTITION_INFO_PROTOCOL;\r
+\r
+#pragma pack()\r
+\r
+///\r
+/// Partition Information Protocol GUID variable.\r
+///\r
+extern EFI_GUID gEfiPartitionInfoProtocolGuid;\r
+\r
+#endif\r
index 0bdf22168726ae2fde09ea21453d6fbdad440ade..d6928b3f97bfad15037018684fd0dc6d424d9a4d 100644 (file)
   ## Include/Protocol/ResetNotification.h\r
   gEfiResetNotificationProtocolGuid         = { 0x9da34ae0, 0xeaf9, 0x4bbf, { 0x8e, 0xc3, 0xfd, 0x60, 0x22, 0x6c, 0x44, 0xbe } }\r
 \r
+  ## Include/Protocol/PartitionInfo.h\r
+  gEfiPartitionInfoProtocolGuid             = { 0x8cf2f62c, 0xbc9b, 0x4821, { 0x80, 0x8d, 0xec, 0x9e, 0xc4, 0x21, 0xa1, 0xa0 }}\r
+\r
   #\r
   # Protocols defined in Shell2.0\r
   #\r