]>
Commit | Line | Data |
---|---|---|
959ccb23 | 1 | /** @file\r |
2 | The firmware file related definitions in PI.\r | |
3 | \r | |
bf099261 | 4 | Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r |
af2dc6a7 | 5 | This program and the accompanying materials are licensed and made available under \r |
6 | the terms and conditions of the BSD License that accompanies this distribution. \r | |
7 | The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php. \r | |
959ccb23 | 9 | \r |
af2dc6a7 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
959ccb23 | 12 | \r |
959ccb23 | 13 | @par Revision Reference:\r |
af2dc6a7 | 14 | PI Version 1.2.\r |
959ccb23 | 15 | \r |
16 | **/\r | |
17 | \r | |
0b3cac32 | 18 | \r |
959ccb23 | 19 | #ifndef __PI_FIRMWARE_FILE_H__\r |
20 | #define __PI_FIRMWARE_FILE_H__\r | |
21 | \r | |
62d1e08b | 22 | #pragma pack(1)\r |
dc53faa3 | 23 | ///\r |
24 | /// Used to verify the integrity of the file.\r | |
25 | /// \r | |
959ccb23 | 26 | typedef union {\r |
27 | struct {\r | |
1bf79370 LG |
28 | ///\r |
29 | /// The IntegrityCheck.Checksum.Header field is an 8-bit checksum of the file\r | |
30 | /// header. The State and IntegrityCheck.Checksum.File fields are assumed\r | |
31 | /// to be zero and the checksum is calculated such that the entire header sums to zero.\r | |
32 | ///\r | |
959ccb23 | 33 | UINT8 Header;\r |
1bf79370 LG |
34 | ///\r |
35 | /// If the FFS_ATTRIB_CHECKSUM (see definition below) bit of the Attributes\r | |
36 | /// field is set to one, the IntegrityCheck.Checksum.File field is an 8-bit\r | |
bf099261 | 37 | /// checksum of the file data.\r |
1bf79370 LG |
38 | /// If the FFS_ATTRIB_CHECKSUM bit of the Attributes field is cleared to zero,\r |
39 | /// the IntegrityCheck.Checksum.File field must be initialized with a value of\r | |
2bf0d835 | 40 | /// 0xAA. The IntegrityCheck.Checksum.File field is valid any time the\r |
1bf79370 LG |
41 | /// EFI_FILE_DATA_VALID bit is set in the State field.\r |
42 | ///\r | |
959ccb23 | 43 | UINT8 File;\r |
44 | } Checksum;\r | |
1bf79370 LG |
45 | ///\r |
46 | /// This is the full 16 bits of the IntegrityCheck field.\r | |
47 | ///\r | |
959ccb23 | 48 | UINT16 Checksum16;\r |
49 | } EFI_FFS_INTEGRITY_CHECK;\r | |
50 | \r | |
2bf0d835 LG |
51 | ///\r |
52 | /// FFS_FIXED_CHECKSUM is the checksum value used when the\r | |
af2dc6a7 | 53 | /// FFS_ATTRIB_CHECKSUM attribute bit is clear.\r |
2bf0d835 LG |
54 | ///\r |
55 | #define FFS_FIXED_CHECKSUM 0xAA\r | |
56 | \r | |
959ccb23 | 57 | typedef UINT8 EFI_FV_FILETYPE;\r |
58 | typedef UINT8 EFI_FFS_FILE_ATTRIBUTES;\r | |
59 | typedef UINT8 EFI_FFS_FILE_STATE;\r | |
60 | \r | |
dc53faa3 | 61 | ///\r |
62 | /// File Types Definitions\r | |
63 | /// \r | |
d44d2087 | 64 | #define EFI_FV_FILETYPE_ALL 0x00\r |
8fb30482 | 65 | #define EFI_FV_FILETYPE_RAW 0x01\r |
66 | #define EFI_FV_FILETYPE_FREEFORM 0x02\r | |
67 | #define EFI_FV_FILETYPE_SECURITY_CORE 0x03\r | |
68 | #define EFI_FV_FILETYPE_PEI_CORE 0x04\r | |
69 | #define EFI_FV_FILETYPE_DXE_CORE 0x05\r | |
70 | #define EFI_FV_FILETYPE_PEIM 0x06\r | |
71 | #define EFI_FV_FILETYPE_DRIVER 0x07\r | |
72 | #define EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER 0x08\r | |
73 | #define EFI_FV_FILETYPE_APPLICATION 0x09\r | |
95ba3c41 | 74 | #define EFI_FV_FILETYPE_SMM 0x0A\r |
8fb30482 | 75 | #define EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE 0x0B\r |
95ba3c41 | 76 | #define EFI_FV_FILETYPE_COMBINED_SMM_DXE 0x0C\r |
77 | #define EFI_FV_FILETYPE_SMM_CORE 0x0D\r | |
8fb30482 | 78 | #define EFI_FV_FILETYPE_OEM_MIN 0xc0\r |
79 | #define EFI_FV_FILETYPE_OEM_MAX 0xdf\r | |
80 | #define EFI_FV_FILETYPE_DEBUG_MIN 0xe0\r | |
81 | #define EFI_FV_FILETYPE_DEBUG_MAX 0xef\r | |
82 | #define EFI_FV_FILETYPE_FFS_MIN 0xf0\r | |
83 | #define EFI_FV_FILETYPE_FFS_MAX 0xff\r | |
84 | #define EFI_FV_FILETYPE_FFS_PAD 0xf0\r | |
dc53faa3 | 85 | /// \r |
86 | /// FFS File Attributes.\r | |
87 | /// \r | |
3d4d4cfa | 88 | #define FFS_ATTRIB_LARGE_FILE 0x01\r |
959ccb23 | 89 | #define FFS_ATTRIB_FIXED 0x04\r |
90 | #define FFS_ATTRIB_DATA_ALIGNMENT 0x38\r | |
91 | #define FFS_ATTRIB_CHECKSUM 0x40\r | |
92 | \r | |
dc53faa3 | 93 | /// \r |
94 | /// FFS File State Bits.\r | |
95 | /// \r | |
959ccb23 | 96 | #define EFI_FILE_HEADER_CONSTRUCTION 0x01\r |
97 | #define EFI_FILE_HEADER_VALID 0x02\r | |
98 | #define EFI_FILE_DATA_VALID 0x04\r | |
99 | #define EFI_FILE_MARKED_FOR_UPDATE 0x08\r | |
100 | #define EFI_FILE_DELETED 0x10\r | |
101 | #define EFI_FILE_HEADER_INVALID 0x20\r | |
102 | \r | |
103 | \r | |
dc53faa3 | 104 | ///\r |
105 | /// Each file begins with the header that describe the \r | |
106 | /// contents and state of the files.\r | |
107 | /// \r | |
959ccb23 | 108 | typedef struct {\r |
1bf79370 LG |
109 | ///\r |
110 | /// This GUID is the file name. It is used to uniquely identify the file.\r | |
111 | ///\r | |
959ccb23 | 112 | EFI_GUID Name;\r |
1bf79370 LG |
113 | ///\r |
114 | /// Used to verify the integrity of the file.\r | |
115 | ///\r | |
959ccb23 | 116 | EFI_FFS_INTEGRITY_CHECK IntegrityCheck;\r |
1bf79370 LG |
117 | ///\r |
118 | /// Identifies the type of file.\r | |
119 | ///\r | |
959ccb23 | 120 | EFI_FV_FILETYPE Type;\r |
1bf79370 LG |
121 | ///\r |
122 | /// Declares various file attribute bits.\r | |
123 | ///\r | |
959ccb23 | 124 | EFI_FFS_FILE_ATTRIBUTES Attributes;\r |
1bf79370 LG |
125 | ///\r |
126 | /// The length of the file in bytes, including the FFS header.\r | |
127 | ///\r | |
959ccb23 | 128 | UINT8 Size[3];\r |
1bf79370 LG |
129 | ///\r |
130 | /// Used to track the state of the file throughout the life of the file from creation to deletion.\r | |
131 | ///\r | |
959ccb23 | 132 | EFI_FFS_FILE_STATE State;\r |
133 | } EFI_FFS_FILE_HEADER;\r | |
134 | \r | |
3d4d4cfa | 135 | typedef struct {\r |
136 | ///\r | |
137 | /// This GUID is the file name. It is used to uniquely identify the file. There may be only\r | |
138 | /// one instance of a file with the file name GUID of Name in any given firmware\r | |
139 | /// volume, except if the file type is EFI_FV_FILETYPE_FFS_PAD.\r | |
140 | ///\r | |
141 | EFI_GUID Name;\r | |
142 | \r | |
143 | ///\r | |
144 | /// Used to verify the integrity of the file.\r | |
145 | /// \r | |
146 | EFI_FFS_INTEGRITY_CHECK IntegrityCheck;\r | |
147 | \r | |
148 | ///\r | |
149 | /// Identifies the type of file.\r | |
150 | /// \r | |
151 | EFI_FV_FILETYPE Type;\r | |
152 | \r | |
153 | ///\r | |
154 | /// Declares various file attribute bits.\r | |
155 | /// \r | |
156 | EFI_FFS_FILE_ATTRIBUTES Attributes;\r | |
157 | \r | |
158 | ///\r | |
159 | /// The length of the file in bytes, including the FFS header.\r | |
160 | /// The length of the file data is either (Size - sizeof(EFI_FFS_FILE_HEADER)). This calculation means a\r | |
161 | /// zero-length file has a Size of 24 bytes, which is sizeof(EFI_FFS_FILE_HEADER).\r | |
162 | /// Size is not required to be a multiple of 8 bytes. Given a file F, the next file header is\r | |
163 | /// located at the next 8-byte aligned firmware volume offset following the last byte of the file F.\r | |
164 | ///\r | |
165 | UINT8 Size[3];\r | |
166 | \r | |
167 | ///\r | |
168 | /// Used to track the state of the file throughout the life of the file from creation to deletion.\r | |
169 | ///\r | |
170 | EFI_FFS_FILE_STATE State;\r | |
171 | \r | |
172 | ///\r | |
af2dc6a7 | 173 | /// If FFS_ATTRIB_LARGE_FILE is set in Attributes, then ExtendedSize exists and Size must be set to zero.\r |
3d4d4cfa | 174 | /// If FFS_ATTRIB_LARGE_FILE is not set then EFI_FFS_FILE_HEADER is used.\r |
175 | ///\r | |
176 | EFI_FFS_FILE_STATE ExtendedSize;\r | |
177 | } EFI_FFS_FILE_HEADER2;\r | |
959ccb23 | 178 | \r |
179 | typedef UINT8 EFI_SECTION_TYPE;\r | |
180 | \r | |
dc53faa3 | 181 | ///\r |
af2dc6a7 | 182 | /// Pseudo type. It is used as a wild card when retrieving sections.\r |
183 | /// The section type EFI_SECTION_ALL matches all section types.\r | |
dc53faa3 | 184 | ///\r |
959ccb23 | 185 | #define EFI_SECTION_ALL 0x00\r |
186 | \r | |
dc53faa3 | 187 | ///\r |
af2dc6a7 | 188 | /// Encapsulation section Type values.\r |
dc53faa3 | 189 | ///\r |
959ccb23 | 190 | #define EFI_SECTION_COMPRESSION 0x01\r |
191 | \r | |
192 | #define EFI_SECTION_GUID_DEFINED 0x02\r | |
193 | \r | |
3d4d4cfa | 194 | #define EFI_SECTION_DISPOSABLE 0x03\r |
195 | \r | |
dc53faa3 | 196 | ///\r |
af2dc6a7 | 197 | /// Leaf section Type values.\r |
dc53faa3 | 198 | ///\r |
959ccb23 | 199 | #define EFI_SECTION_PE32 0x10\r |
200 | #define EFI_SECTION_PIC 0x11\r | |
201 | #define EFI_SECTION_TE 0x12\r | |
202 | #define EFI_SECTION_DXE_DEPEX 0x13\r | |
203 | #define EFI_SECTION_VERSION 0x14\r | |
204 | #define EFI_SECTION_USER_INTERFACE 0x15\r | |
205 | #define EFI_SECTION_COMPATIBILITY16 0x16\r | |
206 | #define EFI_SECTION_FIRMWARE_VOLUME_IMAGE 0x17\r | |
207 | #define EFI_SECTION_FREEFORM_SUBTYPE_GUID 0x18\r | |
208 | #define EFI_SECTION_RAW 0x19\r | |
209 | #define EFI_SECTION_PEI_DEPEX 0x1B\r | |
3d4d4cfa | 210 | #define EFI_SECTION_SMM_DEPEX 0x1C\r |
959ccb23 | 211 | \r |
dc53faa3 | 212 | ///\r |
af2dc6a7 | 213 | /// Common section header.\r |
dc53faa3 | 214 | /// \r |
959ccb23 | 215 | typedef struct {\r |
1bf79370 LG |
216 | ///\r |
217 | /// A 24-bit unsigned integer that contains the total size of the section in bytes, \r | |
218 | /// including the EFI_COMMON_SECTION_HEADER.\r | |
219 | ///\r | |
959ccb23 | 220 | UINT8 Size[3];\r |
221 | EFI_SECTION_TYPE Type;\r | |
1bf79370 LG |
222 | ///\r |
223 | /// Declares the section type.\r | |
224 | ///\r | |
959ccb23 | 225 | } EFI_COMMON_SECTION_HEADER;\r |
226 | \r | |
3d4d4cfa | 227 | typedef struct {\r |
228 | ///\r | |
229 | /// A 24-bit unsigned integer that contains the total size of the section in bytes, \r | |
230 | /// including the EFI_COMMON_SECTION_HEADER.\r | |
231 | ///\r | |
232 | UINT8 Size[3];\r | |
233 | \r | |
234 | EFI_SECTION_TYPE Type;\r | |
235 | \r | |
236 | ///\r | |
af2dc6a7 | 237 | /// If Size is 0xFFFFFF, then ExtendedSize contains the size of the section. If\r |
238 | /// Size is not equal to 0xFFFFFF, then this field does not exist. \r | |
3d4d4cfa | 239 | ///\r |
240 | UINT32 ExtendedSize;\r | |
241 | } EFI_COMMON_SECTION_HEADER2;\r | |
242 | \r | |
dc53faa3 | 243 | ///\r |
244 | /// Leaf section type that contains an \r | |
245 | /// IA-32 16-bit executable image.\r | |
246 | /// \r | |
3d4d4cfa | 247 | typedef EFI_COMMON_SECTION_HEADER EFI_COMPATIBILITY16_SECTION;\r |
248 | typedef EFI_COMMON_SECTION_HEADER2 EFI_COMPATIBILITY16_SECTION2;\r | |
959ccb23 | 249 | \r |
dc53faa3 | 250 | ///\r |
251 | /// CompressionType of EFI_COMPRESSION_SECTION.\r | |
252 | /// \r | |
959ccb23 | 253 | #define EFI_NOT_COMPRESSED 0x00\r |
254 | #define EFI_STANDARD_COMPRESSION 0x01\r | |
dc53faa3 | 255 | ///\r |
256 | /// An encapsulation section type in which the \r | |
257 | /// section data is compressed.\r | |
258 | /// \r | |
959ccb23 | 259 | typedef struct {\r |
1bf79370 LG |
260 | ///\r |
261 | /// Usual common section header. CommonHeader.Type = EFI_SECTION_COMPRESSION.\r | |
262 | ///\r | |
00edb218 | 263 | EFI_COMMON_SECTION_HEADER CommonHeader;\r |
1bf79370 | 264 | ///\r |
af2dc6a7 | 265 | /// The UINT32 that indicates the size of the section data after decompression.\r |
1bf79370 | 266 | ///\r |
00edb218 | 267 | UINT32 UncompressedLength;\r |
1bf79370 LG |
268 | ///\r |
269 | /// Indicates which compression algorithm is used.\r | |
270 | ///\r | |
00edb218 | 271 | UINT8 CompressionType;\r |
959ccb23 | 272 | } EFI_COMPRESSION_SECTION;\r |
273 | \r | |
3d4d4cfa | 274 | typedef struct {\r |
275 | ///\r | |
276 | /// Usual common section header. CommonHeader.Type = EFI_SECTION_COMPRESSION.\r | |
277 | ///\r | |
278 | EFI_COMMON_SECTION_HEADER2 CommonHeader;\r | |
279 | ///\r | |
280 | /// UINT32 that indicates the size of the section data after decompression.\r | |
281 | ///\r | |
282 | UINT32 UncompressedLength;\r | |
283 | ///\r | |
284 | /// Indicates which compression algorithm is used.\r | |
285 | ///\r | |
286 | UINT8 CompressionType;\r | |
287 | } EFI_COMPRESSION_SECTION2;\r | |
288 | \r | |
73d622ed | 289 | ///\r |
290 | /// An encapsulation section type in which the section data is disposable.\r | |
291 | /// A disposable section is an encapsulation section in which the section data may be disposed of during\r | |
292 | /// the process of creating or updating a firmware image without significant impact on the usefulness of\r | |
293 | /// the file. The Type field in the section header is set to EFI_SECTION_DISPOSABLE. This\r | |
294 | /// allows optional or descriptive data to be included with the firmware file which can be removed in\r | |
295 | /// order to conserve space. The contents of this section are implementation specific, but might contain\r | |
296 | /// debug data or detailed integration instructions.\r | |
297 | ///\r | |
3d4d4cfa | 298 | typedef EFI_COMMON_SECTION_HEADER EFI_DISPOSABLE_SECTION;\r |
299 | typedef EFI_COMMON_SECTION_HEADER2 EFI_DISPOSABLE_SECTION2;\r | |
73d622ed | 300 | \r |
dc53faa3 | 301 | ///\r |
af2dc6a7 | 302 | /// The leaf section which could be used to determine the dispatch order of DXEs.\r |
dc53faa3 | 303 | /// \r |
3d4d4cfa | 304 | typedef EFI_COMMON_SECTION_HEADER EFI_DXE_DEPEX_SECTION;\r |
305 | typedef EFI_COMMON_SECTION_HEADER2 EFI_DXE_DEPEX_SECTION2;\r | |
959ccb23 | 306 | \r |
dc53faa3 | 307 | ///\r |
af2dc6a7 | 308 | /// The leaf section which contains a PI FV.\r |
dc53faa3 | 309 | /// \r |
3d4d4cfa | 310 | typedef EFI_COMMON_SECTION_HEADER EFI_FIRMWARE_VOLUME_IMAGE_SECTION;\r |
311 | typedef EFI_COMMON_SECTION_HEADER2 EFI_FIRMWARE_VOLUME_IMAGE_SECTION2;\r | |
959ccb23 | 312 | \r |
dc53faa3 | 313 | ///\r |
af2dc6a7 | 314 | /// The leaf section which contains a single GUID.\r |
dc53faa3 | 315 | /// \r |
959ccb23 | 316 | typedef struct {\r |
1bf79370 LG |
317 | ///\r |
318 | /// Common section header. CommonHeader.Type = EFI_SECTION_FREEFORM_SUBTYPE_GUID.\r | |
319 | ///\r | |
00edb218 | 320 | EFI_COMMON_SECTION_HEADER CommonHeader;\r |
1bf79370 LG |
321 | ///\r |
322 | /// This GUID is defined by the creator of the file. It is a vendor-defined file type.\r | |
323 | ///\r | |
00edb218 | 324 | EFI_GUID SubTypeGuid;\r |
959ccb23 | 325 | } EFI_FREEFORM_SUBTYPE_GUID_SECTION;\r |
326 | \r | |
3d4d4cfa | 327 | typedef struct {\r |
328 | ///\r | |
af2dc6a7 | 329 | /// The common section header. CommonHeader.Type = EFI_SECTION_FREEFORM_SUBTYPE_GUID.\r |
3d4d4cfa | 330 | ///\r |
331 | EFI_COMMON_SECTION_HEADER2 CommonHeader;\r | |
332 | ///\r | |
333 | /// This GUID is defined by the creator of the file. It is a vendor-defined file type.\r | |
334 | /// \r | |
335 | EFI_GUID SubTypeGuid;\r | |
336 | } EFI_FREEFORM_SUBTYPE_GUID_SECTION2;\r | |
337 | \r | |
dc53faa3 | 338 | ///\r |
af2dc6a7 | 339 | /// Attributes of EFI_GUID_DEFINED_SECTION.\r |
dc53faa3 | 340 | /// \r |
959ccb23 | 341 | #define EFI_GUIDED_SECTION_PROCESSING_REQUIRED 0x01\r |
342 | #define EFI_GUIDED_SECTION_AUTH_STATUS_VALID 0x02\r | |
dc53faa3 | 343 | ///\r |
af2dc6a7 | 344 | /// The leaf section which is encapsulation defined by specific GUID.\r |
dc53faa3 | 345 | /// \r |
959ccb23 | 346 | typedef struct {\r |
1bf79370 | 347 | ///\r |
af2dc6a7 | 348 | /// The common section header. CommonHeader.Type = EFI_SECTION_GUID_DEFINED.\r |
1bf79370 | 349 | ///\r |
00edb218 | 350 | EFI_COMMON_SECTION_HEADER CommonHeader;\r |
1bf79370 | 351 | ///\r |
af2dc6a7 | 352 | /// The GUID that defines the format of the data that follows. It is a vendor-defined section type.\r |
1bf79370 | 353 | ///\r |
00edb218 | 354 | EFI_GUID SectionDefinitionGuid;\r |
1bf79370 LG |
355 | ///\r |
356 | /// Contains the offset in bytes from the beginning of the common header to the first byte of the data.\r | |
357 | ///\r | |
00edb218 | 358 | UINT16 DataOffset;\r |
1bf79370 | 359 | ///\r |
af2dc6a7 | 360 | /// The bit field that declares some specific characteristics of the section contents.\r |
1bf79370 | 361 | ///\r |
00edb218 | 362 | UINT16 Attributes;\r |
959ccb23 | 363 | } EFI_GUID_DEFINED_SECTION;\r |
364 | \r | |
3d4d4cfa | 365 | typedef struct {\r |
366 | ///\r | |
af2dc6a7 | 367 | /// The common section header. CommonHeader.Type = EFI_SECTION_GUID_DEFINED.\r |
3d4d4cfa | 368 | ///\r |
369 | EFI_COMMON_SECTION_HEADER2 CommonHeader;\r | |
370 | ///\r | |
af2dc6a7 | 371 | /// The GUID that defines the format of the data that follows. It is a vendor-defined section type.\r |
3d4d4cfa | 372 | /// \r |
373 | EFI_GUID SectionDefinitionGuid;\r | |
374 | ///\r | |
375 | /// Contains the offset in bytes from the beginning of the common header to the first byte of the data.\r | |
376 | /// \r | |
377 | UINT16 DataOffset;\r | |
378 | ///\r | |
af2dc6a7 | 379 | /// The bit field that declares some specific characteristics of the section contents.\r |
3d4d4cfa | 380 | /// \r |
381 | UINT16 Attributes;\r | |
382 | } EFI_GUID_DEFINED_SECTION2;\r | |
383 | \r | |
dc53faa3 | 384 | ///\r |
af2dc6a7 | 385 | /// The leaf section which contains PE32+ image.\r |
dc53faa3 | 386 | /// \r |
3d4d4cfa | 387 | typedef EFI_COMMON_SECTION_HEADER EFI_PE32_SECTION;\r |
388 | typedef EFI_COMMON_SECTION_HEADER2 EFI_PE32_SECTION2;\r | |
959ccb23 | 389 | \r |
dc53faa3 | 390 | ///\r |
af2dc6a7 | 391 | /// The leaf section used to determine the dispatch order of PEIMs.\r |
dc53faa3 | 392 | /// \r |
3d4d4cfa | 393 | typedef EFI_COMMON_SECTION_HEADER EFI_PEI_DEPEX_SECTION;\r |
394 | typedef EFI_COMMON_SECTION_HEADER2 EFI_PEI_DEPEX_SECTION2;\r | |
395 | \r | |
396 | ///\r | |
397 | /// A leaf section type that contains a position-independent-code (PIC) image.\r | |
398 | /// A PIC image section is a leaf section that contains a position-independent-code (PIC) image.\r | |
399 | /// In addition to normal PE32+ images that contain relocation information, PEIM executables may be\r | |
400 | /// PIC and are referred to as PIC images. A PIC image is the same as a PE32+ image except that all\r | |
401 | /// relocation information has been stripped from the image and the image can be moved and will\r | |
402 | /// execute correctly without performing any relocation or other fix-ups. EFI_PIC_SECTION2 must\r | |
403 | /// be used if the section is 16MB or larger.\r | |
404 | ///\r | |
405 | typedef EFI_COMMON_SECTION_HEADER EFI_PIC_SECTION;\r | |
406 | typedef EFI_COMMON_SECTION_HEADER2 EFI_PIC_SECTION2;\r | |
959ccb23 | 407 | \r |
dc53faa3 | 408 | ///\r |
af2dc6a7 | 409 | /// The leaf section which constains the position-independent-code image.\r |
dc53faa3 | 410 | /// \r |
3d4d4cfa | 411 | typedef EFI_COMMON_SECTION_HEADER EFI_TE_SECTION;\r |
412 | typedef EFI_COMMON_SECTION_HEADER2 EFI_TE_SECTION2;\r | |
959ccb23 | 413 | \r |
dc53faa3 | 414 | ///\r |
af2dc6a7 | 415 | /// The leaf section which contains an array of zero or more bytes.\r |
dc53faa3 | 416 | /// \r |
3d4d4cfa | 417 | typedef EFI_COMMON_SECTION_HEADER EFI_RAW_SECTION;\r |
418 | typedef EFI_COMMON_SECTION_HEADER2 EFI_RAW_SECTION2;\r | |
419 | \r | |
420 | /// \r | |
421 | /// The SMM dependency expression section is a leaf section that contains a dependency expression that\r | |
422 | /// is used to determine the dispatch order for SMM drivers. Before the SMRAM invocation of the\r | |
423 | /// SMM driver's entry point, this dependency expression must evaluate to TRUE. See the Platform\r | |
af2dc6a7 | 424 | /// Initialization Specification, Volume 2, for details regarding the format of the dependency expression.\r |
3d4d4cfa | 425 | /// The dependency expression may refer to protocols installed in either the UEFI or the SMM protocol\r |
426 | /// database. EFI_SMM_DEPEX_SECTION2 must be used if the section is 16MB or larger.\r | |
427 | /// \r | |
428 | typedef EFI_COMMON_SECTION_HEADER EFI_SMM_DEPEX_SECTION;\r | |
429 | typedef EFI_COMMON_SECTION_HEADER2 EFI_SMM_DEPEX_SECTION2;\r | |
959ccb23 | 430 | \r |
dc53faa3 | 431 | ///\r |
af2dc6a7 | 432 | /// The leaf section which contains a unicode string that \r |
dc53faa3 | 433 | /// is human readable file name.\r |
434 | /// \r | |
959ccb23 | 435 | typedef struct {\r |
00edb218 | 436 | EFI_COMMON_SECTION_HEADER CommonHeader;\r |
959ccb23 | 437 | \r |
dc53faa3 | 438 | ///\r |
439 | /// Array of unicode string.\r | |
440 | /// \r | |
00edb218 | 441 | CHAR16 FileNameString[1];\r |
959ccb23 | 442 | } EFI_USER_INTERFACE_SECTION;\r |
443 | \r | |
3d4d4cfa | 444 | typedef struct {\r |
445 | EFI_COMMON_SECTION_HEADER2 CommonHeader;\r | |
446 | CHAR16 FileNameString[1];\r | |
447 | } EFI_USER_INTERFACE_SECTION2;\r | |
959ccb23 | 448 | \r |
dc53faa3 | 449 | ///\r |
af2dc6a7 | 450 | /// The leaf section which contains a numeric build number and\r |
4b503a77 | 451 | /// an optional unicode string that represents the file revision. \r |
dc53faa3 | 452 | /// \r |
959ccb23 | 453 | typedef struct {\r |
00edb218 A |
454 | EFI_COMMON_SECTION_HEADER CommonHeader;\r |
455 | UINT16 BuildNumber;\r | |
7b1bf9f6 | 456 | \r |
457 | ///\r | |
458 | /// Array of unicode string.\r | |
459 | /// \r | |
00edb218 | 460 | CHAR16 VersionString[1];\r |
959ccb23 | 461 | } EFI_VERSION_SECTION;\r |
462 | \r | |
3d4d4cfa | 463 | typedef struct {\r |
464 | EFI_COMMON_SECTION_HEADER2 CommonHeader;\r | |
465 | ///\r | |
466 | /// A UINT16 that represents a particular build. Subsequent builds have monotonically\r | |
467 | /// increasing build numbers relative to earlier builds.\r | |
468 | ///\r | |
469 | UINT16 BuildNumber;\r | |
470 | CHAR16 VersionString[1];\r | |
471 | } EFI_VERSION_SECTION2;\r | |
ddd3f471 | 472 | \r |
473 | #define SECTION_SIZE(SectionHeaderPtr) \\r | |
474 | ((UINT32) (*((UINT32 *) ((EFI_COMMON_SECTION_HEADER *) SectionHeaderPtr)->Size) & 0x00ffffff))\r | |
475 | \r | |
62d1e08b | 476 | #pragma pack()\r |
ddd3f471 | 477 | \r |
959ccb23 | 478 | #endif\r |
479 | \r |