]>
Commit | Line | Data |
---|---|---|
79964ac8 | 1 | /** @file\r |
aa4a31e3 | 2 | Framework Capule related Definition.\r |
79964ac8 | 3 | \r |
1c2f052d | 4 | Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r |
22a69a5e | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
79964ac8 | 6 | \r |
79964ac8 | 7 | @par Revision Reference:\r |
aa4a31e3 | 8 | Capsule Spec Version 0.9\r |
79964ac8 | 9 | **/\r |
10 | \r | |
11 | #ifndef _CAPSULE_GUID_H__\r | |
12 | #define _CAPSULE_GUID_H__\r | |
13 | \r | |
14 | //\r | |
15 | // This is the GUID of the capsule header of the image on disk.\r | |
16 | //\r | |
17 | #define EFI_CAPSULE_GUID \\r | |
18 | { \\r | |
19 | 0x3B6686BD, 0x0D76, 0x4030, {0xB7, 0x0E, 0xB5, 0x51, 0x9E, 0x2F, 0xC5, 0xA0 } \\r | |
20 | }\r | |
21 | \r | |
22 | //\r | |
23 | // This is the GUID of the configuration results file created by the capsule\r | |
24 | // application.\r | |
25 | //\r | |
26 | #define EFI_CONFIG_FILE_NAME_GUID \\r | |
27 | { \\r | |
28 | 0x98B8D59B, 0xE8BA, 0x48EE, {0x98, 0xDD, 0xC2, 0x95, 0x39, 0x2F, 0x1E, 0xDB } \\r | |
29 | }\r | |
30 | \r | |
aa4a31e3 | 31 | ///\r |
f22f941e | 32 | /// Bits in the flags field of the capsule header.\r |
5259c97d | 33 | /// This flag is set if the capsule can support setup changes, and cleared if it cannot.\r |
aa4a31e3 LG |
34 | ///\r |
35 | #define EFI_CAPSULE_HEADER_FLAG_SETUP 0x00000001\r | |
1b144bbf | 36 | \r |
e89ec8f6 | 37 | #define CAPSULE_BLOCK_DESCRIPTOR_SIGNATURE SIGNATURE_32 ('C', 'B', 'D', 'S')\r |
1b144bbf | 38 | \r |
39 | //\r | |
5259c97d | 40 | // An array of these structs describe the blocks that make up a capsule for\r |
1b144bbf | 41 | // a capsule update.\r |
42 | //\r | |
43 | typedef struct {\r | |
f22f941e | 44 | UINT64 Length; ///< Length of the data block.\r |
45 | EFI_PHYSICAL_ADDRESS Data; ///< Physical address of the data block.\r | |
46 | UINT32 Signature; ///< CBDS.\r | |
47 | UINT32 CheckSum; ///< To sum this structure to 0.\r | |
1b144bbf | 48 | } FRAMEWORK_EFI_CAPSULE_BLOCK_DESCRIPTOR;\r |
49 | \r | |
50 | typedef struct {\r | |
51 | EFI_GUID OemGuid;\r | |
52 | UINT32 HeaderSize;\r | |
53 | //\r | |
54 | // UINT8 OemHdrData[];\r | |
55 | //\r | |
56 | } EFI_CAPSULE_OEM_HEADER;\r | |
57 | \r | |
58 | typedef struct {\r | |
aa4a31e3 LG |
59 | ///\r |
60 | /// A defined GUID that indicates the start of a capsule.\r | |
61 | ///\r | |
1b144bbf | 62 | EFI_GUID CapsuleGuid;\r |
aa4a31e3 LG |
63 | ///\r |
64 | /// The size of the EFI_CAPSULE_HEADER structure.\r | |
65 | ///\r | |
1b144bbf | 66 | UINT32 HeaderSize;\r |
aa4a31e3 | 67 | ///\r |
1c2f052d | 68 | /// A bit-mapped list describing the capsule's attributes.\r |
f22f941e | 69 | /// All undefined bits should be written as zero (0).\r |
aa4a31e3 | 70 | ///\r |
1b144bbf | 71 | UINT32 Flags;\r |
aa4a31e3 LG |
72 | ///\r |
73 | /// The length in bytes (27,415 for an image containing 27,415 bytes) of the entire image\r | |
5259c97d | 74 | /// including all headers. If this value is greater than the size of the data presented in\r |
75 | /// the capsule body, the image is separated across multiple media. If this\r | |
aa4a31e3 LG |
76 | /// value is less than the size of the data, it is an error.\r |
77 | ///\r | |
1b144bbf | 78 | UINT32 CapsuleImageSize;\r |
aa4a31e3 LG |
79 | ///\r |
80 | /// A zero-based number that enables a capsule to be split into pieces and then\r | |
81 | /// recombined for easier transfer across media with limited size. The lower the\r | |
82 | /// SequenceNumber, the earlier in the final image that the part of the capsule is to\r | |
83 | /// appear. In capsules that are not split, this value shall be zero.\r | |
84 | ///\r | |
1b144bbf | 85 | UINT32 SequenceNumber;\r |
aa4a31e3 LG |
86 | ///\r |
87 | /// Used to group the various pieces of a split capsule to ensure that they comprise the\r | |
88 | /// same base image. It is valid for this item to be zero, in which case the capsule cannot\r | |
89 | /// be split into components.\r | |
90 | ///\r | |
1b144bbf | 91 | EFI_GUID InstanceId;\r |
aa4a31e3 LG |
92 | ///\r |
93 | /// The offset in bytes from the beginning of the header to the start of an EFI string that\r | |
94 | /// contains a description of the identity of the subcapsules that make up the capsule. If\r | |
95 | /// the capsule is not split, this value should be zero. The same string should be\r | |
96 | /// presented for all subcapsules that constitute the same capsule.\r | |
97 | ///\r | |
1b144bbf | 98 | UINT32 OffsetToSplitInformation;\r |
aa4a31e3 LG |
99 | ///\r |
100 | /// The offset in bytes from the beginning of the header to the start of the part of the\r | |
101 | /// capsule that is to be transferred to DXE.\r | |
102 | ///\r | |
1b144bbf | 103 | UINT32 OffsetToCapsuleBody;\r |
aa4a31e3 LG |
104 | ///\r |
105 | /// The offset in bytes from the beginning of the header to the start of the OEM-defined\r | |
106 | /// header. This value must be less than OffsetToCapsuleBody.\r | |
107 | ///\r | |
1b144bbf | 108 | UINT32 OffsetToOemDefinedHeader;\r |
aa4a31e3 LG |
109 | ///\r |
110 | /// The offset in bytes from the beginning of the header to the start of human-readable\r | |
111 | /// text that describes the entity that created the capsule. This value must be less than OffsetToCapsuleBody.\r | |
112 | ///\r | |
1b144bbf | 113 | UINT32 OffsetToAuthorInformation;\r |
aa4a31e3 LG |
114 | ///\r |
115 | /// The offset in bytes from the beginning of the header to the start of human-readable\r | |
5259c97d | 116 | /// text that describes the revision of the capsule and/or the capsule's contents. This\r |
aa4a31e3 LG |
117 | /// value must be less than OffsetToCapsuleBody.\r |
118 | ///\r | |
1b144bbf | 119 | UINT32 OffsetToRevisionInformation;\r |
aa4a31e3 LG |
120 | ///\r |
121 | /// The offset in bytes from the beginning of the header to the start of a one-line (less\r | |
122 | /// than 40 Unicode characters in any language) description of the capsule. It is intended\r | |
123 | /// to be used by OS-present applications when providing a list of capsules from which\r | |
124 | /// the user can choose. This value must be less than OffsetToCapsuleBody.\r | |
125 | ///\r | |
1b144bbf | 126 | UINT32 OffsetToShortDescription;\r |
aa4a31e3 LG |
127 | ///\r |
128 | /// The offset in bytes from the beginning of the header to the start of an EFI string\r | |
129 | ///\r | |
1b144bbf | 130 | UINT32 OffsetToLongDescription;\r |
aa4a31e3 LG |
131 | ///\r |
132 | /// This field is reserved for future use by this specification. For future compatibility,\r | |
133 | /// this field must be set to zero\r | |
134 | ///\r | |
1b144bbf | 135 | UINT32 OffsetToApplicableDevices;\r |
136 | } FRAMEWORK_EFI_CAPSULE_HEADER;\r | |
137 | \r | |
79964ac8 | 138 | extern EFI_GUID gEfiCapsuleGuid;\r |
139 | extern EFI_GUID gEfiConfigFileNameGuid;\r | |
140 | \r | |
141 | #endif\r |