--- /dev/null
+/*++\r
+\r
+Copyright (c) 2004 - 2007, Intel Corporation \r
+All rights reserved. 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
+Module Name:\r
+\r
+ EfiCapsule.h\r
+\r
+Abstract:\r
+\r
+ Defines for the EFI Capsule functionality\r
+ \r
+--*/\r
+\r
+#ifndef _EFI_CAPSULE_H_\r
+#define _EFI_CAPSULE_H_\r
+\r
+\r
+#define CAPSULE_BLOCK_DESCRIPTOR_SIGNATURE EFI_SIGNATURE_32 ('C', 'B', 'D', 'S')\r
+\r
+typedef struct {\r
+ EFI_GUID OemGuid;\r
+ UINT32 HeaderSize;\r
+ //\r
+ // UINT8 OemHdrData[];\r
+ //\r
+} EFI_CAPSULE_OEM_HEADER;\r
+\r
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
+\r
+#define MAX_SUPPORT_CAPSULE_NUM 50\r
+#define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x00010000\r
+#define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000 \r
+\r
+typedef struct {\r
+ UINT64 Length; \r
+ union { \r
+ EFI_PHYSICAL_ADDRESS DataBlock; \r
+ EFI_PHYSICAL_ADDRESS ContinuationPointer; \r
+ } Union;\r
+} EFI_CAPSULE_BLOCK_DESCRIPTOR;\r
+\r
+typedef struct {\r
+ EFI_GUID CapsuleGuid;\r
+ UINT32 HeaderSize;\r
+ UINT32 Flags;\r
+ UINT32 CapsuleImageSize;\r
+} EFI_CAPSULE_HEADER;\r
+\r
+typedef struct {\r
+ UINT32 CapsuleArrayNumber;\r
+ VOID* CapsulePtr[1];\r
+} EFI_CAPSULE_TABLE;\r
+\r
+typedef struct {\r
+ UINT32 CapsuleGuidNumber;\r
+ EFI_GUID CapsuleGuidPtr[1];\r
+} EFI_CAPSULE_INFO_TABLE;\r
+\r
+//\r
+// This GUID is used for collecting all capsules' Guids who install in ConfigTable.\r
+//\r
+#define EFI_CAPSULE_INFO_GUID \\r
+ { \\r
+ 0x8B34EAC7, 0x2690, 0x460B, 0x8B, 0xA5, 0xD5, 0xCF, 0x32, 0x83, 0x17, 0x35 \\r
+ }\r
+\r
+#else\r
+\r
+typedef struct {\r
+ EFI_GUID CapsuleGuid;\r
+ UINT32 HeaderSize;\r
+ UINT32 Flags;\r
+ UINT32 CapsuleImageSize;\r
+ UINT32 SequenceNumber;\r
+ EFI_GUID InstanceId;\r
+ UINT32 OffsetToSplitInformation;\r
+ UINT32 OffsetToCapsuleBody;\r
+ UINT32 OffsetToOemDefinedHeader;\r
+ UINT32 OffsetToAuthorInformation;\r
+ UINT32 OffsetToRevisionInformation;\r
+ UINT32 OffsetToShortDescription;\r
+ UINT32 OffsetToLongDescription;\r
+ UINT32 OffsetToApplicableDevices;\r
+} EFI_CAPSULE_HEADER;\r
+\r
+//\r
+// An array of these describe the blocks that make up a capsule for\r
+// a capsule update.\r
+//\r
+typedef struct {\r
+ UINT64 Length; // length of the data block\r
+ EFI_PHYSICAL_ADDRESS Data; // physical address of the data block\r
+ UINT32 Signature; // CBDS\r
+ UINT32 CheckSum; // to sum this structure to 0\r
+} EFI_CAPSULE_BLOCK_DESCRIPTOR;\r
+\r
+#endif\r
+\r
+//\r
+// Bits in the flags field of the capsule header\r
+//\r
+#define EFI_CAPSULE_HEADER_FLAG_SETUP 0x00000001 // supports setup changes\r
+//\r
+// This is the GUID of the capsule header of the image on disk.\r
+//\r
+#define EFI_CAPSULE_GUID \\r
+ { \\r
+ 0x3B6686BD, 0x0D76, 0x4030, 0xB7, 0x0E, 0xB5, 0x51, 0x9E, 0x2F, 0xC5, 0xA0 \\r
+ }\r
+\r
+//\r
+// This is the GUID of the file created by the capsule application that contains\r
+// the path to the device(s) to update.\r
+//\r
+#define EFI_PATH_FILE_NAME_GUID \\r
+ { \\r
+ 0x7644C181, 0xFA6E, 0x46DA, 0x80, 0xCB, 0x04, 0xB9, 0x90, 0x40, 0x62, 0xE8 \\r
+ }\r
+//\r
+// This is the GUID of the configuration results file created by the capsule\r
+// application.\r
+//\r
+#define EFI_CONFIG_FILE_NAME_GUID \\r
+ { \\r
+ 0x98B8D59B, 0xE8BA, 0x48EE, 0x98, 0xDD, 0xC2, 0x95, 0x39, 0x2F, 0x1E, 0xDB \\r
+ }\r
+\r
+#endif // #ifndef _EFI_CAPSULE_H_\r