]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Guid/FmpCapsule.h
Enable UEFI firmware to support FMP capsule format.
[mirror_edk2.git] / MdePkg / Include / Guid / FmpCapsule.h
diff --git a/MdePkg/Include/Guid/FmpCapsule.h b/MdePkg/Include/Guid/FmpCapsule.h
new file mode 100644 (file)
index 0000000..ccc6b10
--- /dev/null
@@ -0,0 +1,89 @@
+/** @file\r
+  Guid & data structure used for Delivering Capsules Containing Updates to Firmware\r
+  Managment Protocol\r
+\r
+  Copyright (c) 2013, 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
+  GUIDs defined in UEFI 2.4 spec.\r
+\r
+**/\r
+\r
+\r
+#ifndef _FMP_CAPSULE_GUID_H__\r
+#define _FMP_CAPSULE_GUID_H__\r
+\r
+//\r
+// This is the GUID of the capsule for Firmware Management Protocol.\r
+//\r
+#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID \\r
+  { \\r
+    0x6dcbd5ed, 0xe82d, 0x4c44, {0xbd, 0xa1, 0x71, 0x94, 0x19, 0x9a, 0xd9, 0x2a } \\r
+  }\r
+\r
+#pragma pack(1)\r
+\r
+typedef struct {\r
+  UINT32 Version;\r
+\r
+  ///\r
+  /// The number of drivers included in the capsule and the number of corresponding\r
+  /// offsets stored in ItemOffsetList array. \r
+  ///\r
+  UINT16 EmbeddedDriverCount;\r
+\r
+  ///\r
+  /// The number of payload items included in the capsule and the number of\r
+  /// corresponding offsets stored in the ItemOffsetList array.\r
+  ///\r
+  UINT16 PayloadItemCount;\r
+\r
+  ///\r
+  /// Variable length array of dimension [EmbeddedDriverCount + PayloadItemCount]\r
+  /// containing offsets of each of the drivers and payload items contained within the capsule\r
+  ///\r
+  // UINT64 ItemOffsetList[];\r
+} EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER;\r
+\r
+typedef struct {\r
+  UINT32   Version;\r
+\r
+  ///\r
+  /// Used to identifiy device firmware targeted by this update. This guid is matched by\r
+  /// system firmware against ImageTypeId field within a EFI_FIRMWARE_IMAGE_DESCRIPTOR\r
+  ///\r
+  EFI_GUID UpdateImageTypeId;\r
+\r
+  ///\r
+  /// Passed as ImageIndex in call to EFI_FIRMWARE_MANAGEMENT_PROTOCOL.SetImage()\r
+  ///\r
+  UINT8    UpdateImageIndex;\r
+  UINT8    reserved_bytes[3];\r
+\r
+  ///\r
+  /// Size of the binary update image which immediately follows this structure\r
+  ///\r
+  UINT32   UpdateImageSize;\r
+\r
+  ///\r
+  ///Size of the VendorCode bytes which optionally immediately follow binary update image in the capsule\r
+  ///\r
+  UINT32   UpdateVendorCodeSize;\r
+} EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER;\r
+\r
+#pragma pack()\r
+\r
+\r
+#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION       0x00000001  \r
+#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x00000001\r
+\r
+extern EFI_GUID gEfiFmpCapsuleGuid;\r
+\r
+#endif\r