1 /** 2 Based on Guid/*.h, original notice: 3 4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved. 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 13 @par Revision Reference: 14 GUIDs defined in UEFI 2.0 spec. 15 16 **/ 17 module uefi.guids; 18 import uefi.base; 19 import uefi.base_type; 20 21 import uefi.protocols.loadedimage; 22 import uefi.protocols.graphicsoutput; 23 import uefi.protocols.hash; 24 25 public: 26 extern (C): 27 enum EFI_GUID ACPI_TABLE_GUID = EFI_GUID(0xeb9d2d30, 0x2d88, 0x11d3, [0x9a, 28 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d]); 29 enum EFI_GUID EFI_ACPI_TABLE_GUID = EFI_GUID(0x8868e871, 0xe4f1, 0x11d3, [0xbc, 30 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81]); 31 enum ACPI_10_TABLE_GUID = ACPI_TABLE_GUID; 32 enum EFI_ACPI_20_TABLE_GUID = EFI_ACPI_TABLE_GUID; 33 enum EFI_GUID PEI_APRIORI_FILE_NAME_GUID = EFI_GUID(0x1b45cc0a, 0x156a, 0x428a, 34 [0x62, 0XAF, 0x49, 0x86, 0x4d, 0xa0, 0xe6, 0xe6]); 35 /// This file must be of type EFI_FV_FILETYPE_FREEFORM and must 36 /// contain a single section of type EFI_SECTION_RAW. For details on 37 /// firmware volumes, firmware file types, and firmware file section 38 /// types. 39 struct PEI_APRIORI_FILE_CONTENTS 40 { 41 /// 42 /// An array of zero or more EFI_GUID type entries that match the file names of PEIM 43 /// modules in the same Firmware Volume. The maximum number of entries. 44 /// 45 EFI_GUID[1] FileNamesWithinVolume; 46 } 47 48 enum EFI_GUID EFI_APRIORI_GUID = EFI_GUID(0xfc510ee7, 0xffdc, 0x11d4, [0xbd, 49 0x41, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81]); 50 enum EFI_GUID EFI_CAPSULE_REPORT_GUID = EFI_GUID(0x39b68c46, 0xf7fb, 0x441b, 51 [0xb6, 0xec, 0x16, 0xb0, 0xf6, 0x98, 0x21, 0xf3]); 52 struct EFI_CAPSULE_RESULT_VARIABLE_HEADER 53 { 54 /// 55 /// Size in bytes of the variable including any data beyond header as specified by CapsuleGuid 56 /// 57 UINT32 VariableTotalSize; 58 /// 59 /// For alignment 60 /// 61 UINT32 Reserved; 62 /// 63 /// Guid from EFI_CAPSULE_HEADER 64 /// 65 EFI_GUID CapsuleGuid; 66 /// 67 /// Timestamp using system time when processing completed 68 /// 69 EFI_TIME CapsuleProcessed; 70 /// 71 /// Result of the capsule processing. Exact interpretation of any error code may depend 72 /// upon type of capsule processed 73 /// 74 EFI_STATUS CapsuleStatus; 75 } 76 77 struct EFI_CAPSULE_RESULT_VARIABLE_FMP 78 { 79 /// 80 /// Version of this structure, currently 0x00000001 81 /// 82 UINT16 Version; 83 /// 84 /// The index of the payload within the FMP capsule which was processed to generate this report 85 /// Starting from zero 86 /// 87 UINT8 PayloadIndex; 88 /// 89 /// The UpdateImageIndex from EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER 90 /// (after unsigned conversion from UINT8 to UINT16). 91 /// 92 UINT8 UpdateImageIndex; 93 /// 94 /// The UpdateImageTypeId Guid from EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER. 95 /// 96 EFI_GUID UpdateImageTypeId; 97 /// 98 /// In case of capsule loaded from disk, the zero-terminated array containing file name of capsule that was processed. 99 /// In case of capsule submitted directly to UpdateCapsule() there is no file name, and this field is required to contain a single 16-bit zero character 100 /// which is included in VariableTotalSize. 101 /// 102 /// CHAR16 CapsuleFileName[]; 103 /// 104 /// 105 /// This field will contain a zero-terminated CHAR16 string containing the text representation of the device path of device publishing Firmware Management Protocol 106 /// (if present). In case where device path is not present and the target is not otherwise known to firmware, or when payload was blocked by policy, or skipped, 107 /// this field is required to contain a single 16-bit zero character which is included in VariableTotalSize. 108 /// 109 /// CHAR16 CapsuleTarget[]; 110 /// 111 } 112 113 enum EFI_ERROR_RECORD_SIGNATURE_START = SIGNATURE_32('C', 'P', 'E', 'R'); 114 enum EFI_ERROR_RECORD_SIGNATURE_END = 0xFFFFFFFF; 115 /// Error Severity in Error Record Header and Error Section Descriptor 116 ///@{ 117 enum EFI_GENERIC_ERROR_RECOVERABLE = 0x00000000; 118 enum EFI_GENERIC_ERROR_FATAL = 0x00000001; 119 enum EFI_GENERIC_ERROR_CORRECTED = 0x00000002; 120 enum EFI_GENERIC_ERROR_INFO = 0x00000003; 121 ///@} 122 /// The validation bit mask indicates the validity of the following fields 123 /// in Error Record Header. 124 ///@{ 125 enum EFI_ERROR_RECORD_HEADER_PLATFORM_ID_VALID = BIT0; 126 enum EFI_ERROR_RECORD_HEADER_TIME_STAMP_VALID = BIT1; 127 enum EFI_ERROR_RECORD_HEADER_PARTITION_ID_VALID = BIT2; 128 ///@} 129 /// Timestamp is precise if this bit is set and correlates to the time of the 130 /// error event. 131 enum EFI_ERROR_TIME_STAMP_PRECISE = BIT0; 132 /// The timestamp correlates to the time when the error information was collected 133 /// by the system software and may not necessarily represent the time of the error 134 /// event. The timestamp contains the local time in BCD format. 135 struct EFI_ERROR_TIME_STAMP 136 { 137 align(1): 138 UINT8 Seconds; 139 UINT8 Minutes; 140 UINT8 Hours; 141 UINT8 Flag; 142 UINT8 Day; 143 UINT8 Month; 144 UINT8 Year; 145 UINT8 Century; 146 } 147 /// GUID value indicating the record association with an error event notification type. 148 ///@{ 149 enum EFI_GUID EFI_EVENT_NOTIFICATION_TYEP_CMC_GUID = EFI_GUID(0x2DCE8BB1, 150 0xBDD7, 0x450e, [0xB9, 0xAD, 0x9C, 0xF4, 0xEB, 0xD4, 0xF8, 0x90]); 151 enum EFI_GUID EFI_EVENT_NOTIFICATION_TYEP_CPE_GUID = EFI_GUID(0x4E292F96, 152 0xD843, 0x4a55, [0xA8, 0xC2, 0xD4, 0x81, 0xF2, 0x7E, 0xBE, 0xEE]); 153 enum EFI_GUID EFI_EVENT_NOTIFICATION_TYEP_MCE_GUID = EFI_GUID(0xE8F56FFE, 154 0x919C, 0x4cc5, [0xBA, 0x88, 0x65, 0xAB, 0xE1, 0x49, 0x13, 0xBB]); 155 enum EFI_GUID EFI_EVENT_NOTIFICATION_TYEP_PCIE_GUID = EFI_GUID(0xCF93C01F, 156 0x1A16, 0x4dfc, [0xB8, 0xBC, 0x9C, 0x4D, 0xAF, 0x67, 0xC1, 0x04]); 157 enum EFI_GUID EFI_EVENT_NOTIFICATION_TYEP_INIT_GUID = EFI_GUID(0xCC5263E8, 158 0x9308, 0x454a, [0x89, 0xD0, 0x34, 0x0B, 0xD3, 0x9B, 0xC9, 0x8E]); 159 enum EFI_GUID EFI_EVENT_NOTIFICATION_TYEP_NMI_GUID = EFI_GUID(0x5BAD89FF, 160 0xB7E6, 0x42c9, [0x81, 0x4A, 0xCF, 0x24, 0x85, 0xD6, 0xE9, 0x8A]); 161 enum EFI_GUID EFI_EVENT_NOTIFICATION_TYEP_BOOT_GUID = EFI_GUID(0x3D61A466, 162 0xAB40, 0x409a, [0xA6, 0x98, 0xF3, 0x62, 0xD4, 0x64, 0xB3, 0x8F]); 163 enum EFI_GUID EFI_EVENT_NOTIFICATION_TYEP_DMAR_GUID = EFI_GUID(0x667DD791, 164 0xC6B3, 0x4c27, [0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41]); 165 ///@} 166 /// Error Record Header Flags 167 ///@{ 168 enum EFI_HW_ERROR_FLAGS_RECOVERED = 0x00000001; 169 enum EFI_HW_ERROR_FLAGS_PREVERR = 0x00000002; 170 enum EFI_HW_ERROR_FLAGS_SIMULATED = 0x00000004; 171 ///@} 172 /// Common error record header 173 struct EFI_COMMON_ERROR_RECORD_HEADER 174 { 175 align(1): 176 UINT32 SignatureStart; 177 UINT16 Revision; 178 UINT32 SignatureEnd; 179 UINT16 SectionCount; 180 UINT32 ErrorSeverity; 181 UINT32 ValidationBits; 182 UINT32 RecordLength; 183 EFI_ERROR_TIME_STAMP TimeStamp; 184 EFI_GUID PlatformID; 185 EFI_GUID PartitionID; 186 EFI_GUID CreatorID; 187 EFI_GUID NotificationType; 188 UINT64 RecordID; 189 UINT32 Flags; 190 UINT64 PersistenceInfo; 191 UINT8[12] Resv1; 192 /// 193 /// An array of SectionCount descriptors for the associated 194 /// sections. The number of valid sections is equivalent to the 195 /// SectionCount. The buffer size of the record may include 196 /// more space to dynamically add additional Section 197 /// Descriptors to the error record. 198 /// 199 } 200 /// Validity Fields in Error Section Descriptor. 201 enum EFI_ERROR_SECTION_FRU_ID_VALID = BIT0; 202 enum EFI_ERROR_SECTION_FRU_STRING_VALID = BIT1; 203 /// Flag field contains information that describes the error section 204 /// in Error Section Descriptor. 205 enum EFI_ERROR_SECTION_FLAGS_PRIMARY = BIT0; 206 enum EFI_ERROR_SECTION_FLAGS_CONTAINMENT_WARNING = BIT1; 207 enum EFI_ERROR_SECTION_FLAGS_RESET = BIT2; 208 enum EFI_ERROR_SECTION_FLAGS_ERROR_THRESHOLD_EXCEEDED = BIT3; 209 enum EFI_ERROR_SECTION_FLAGS_RESOURCE_NOT_ACCESSIBLE = BIT4; 210 enum EFI_ERROR_SECTION_FLAGS_LATENT_ERROR = BIT5; 211 /// Error Sectition Type GUIDs in Error Section Descriptor 212 ///@{ 213 enum EFI_GUID EFI_ERROR_SECTION_PROCESSOR_GENERIC_GUID = EFI_GUID(0x9876ccad, 214 0x47b4, 0x4bdb, [0xb6, 0x5e, 0x16, 0xf1, 0x93, 0xc4, 0xf3, 0xdb]); 215 enum EFI_GUID EFI_ERROR_SECTION_PROCESSOR_SPECIFIC_GUID = EFI_GUID(0xdc3ea0b0, 216 0xa144, 0x4797, [0xb9, 0x5b, 0x53, 0xfa, 0x24, 0x2b, 0x6e, 0x1d]); 217 enum EFI_GUID EFI_ERROR_SECTION_PLATFORM_MEMORY_GUID = EFI_GUID(0xa5bc1114, 218 0x6f64, 0x4ede, [0xb8, 0x63, 0x3e, 0x83, 0xed, 0x7c, 0x83, 0xb1]); 219 enum EFI_GUID EFI_ERROR_SECTION_PLATFORM_MEMORY2_GUID = EFI_GUID(0x61EC04FC, 220 0x48E6, 0xD813, [0x25, 0xC9, 0x8D, 0xAA, 0x44, 0x75, 0x0B, 0x12]); 221 enum EFI_GUID EFI_ERROR_SECTION_PCIE_GUID = EFI_GUID(0xd995e954, 0xbbc1, 222 0x430f, [0xad, 0x91, 0xb4, 0x4d, 0xcb, 0x3c, 0x6f, 0x35]); 223 enum EFI_GUID EFI_ERROR_SECTION_FW_ERROR_RECORD_GUID = EFI_GUID(0x81212a96, 224 0x09ed, 0x4996, [0x94, 0x71, 0x8d, 0x72, 0x9c, 0x8e, 0x69, 0xed]); 225 enum EFI_GUID EFI_ERROR_SECTION_PCI_PCIX_BUS_GUID = EFI_GUID(0xc5753963, 226 0x3b84, 0x4095, [0xbf, 0x78, 0xed, 0xda, 0xd3, 0xf9, 0xc9, 0xdd]); 227 enum EFI_GUID EFI_ERROR_SECTION_PCI_DEVICE_GUID = EFI_GUID(0xeb5e4685, 0xca66, 228 0x4769, [0xb6, 0xa2, 0x26, 0x06, 0x8b, 0x00, 0x13, 0x26]); 229 enum EFI_GUID EFI_ERROR_SECTION_DMAR_GENERIC_GUID = EFI_GUID(0x5b51fef7, 230 0xc79d, 0x4434, [0x8f, 0x1b, 0xaa, 0x62, 0xde, 0x3e, 0x2c, 0x64]); 231 enum EFI_GUID EFI_ERROR_SECTION_DIRECTED_IO_DMAR_GUID = EFI_GUID(0x71761d37, 232 0x32b2, 0x45cd, [0xa7, 0xd0, 0xb0, 0xfe, 0xdd, 0x93, 0xe8, 0xcf]); 233 enum EFI_GUID EFI_ERROR_SECTION_IOMMU_DMAR_GUID = EFI_GUID(0x036f84e1, 0x7f37, 234 0x428c, [0xa7, 0x9e, 0x57, 0x5f, 0xdf, 0xaa, 0x84, 0xec]); 235 ///@} 236 /// Error Section Descriptor 237 struct EFI_ERROR_SECTION_DESCRIPTOR 238 { 239 align(1): 240 UINT32 SectionOffset; 241 UINT32 SectionLength; 242 UINT16 Revision; 243 UINT8 SecValidMask; 244 UINT8 Resv1; 245 UINT32 SectionFlags; 246 EFI_GUID SectionType; 247 EFI_GUID FruId; 248 UINT32 Severity; 249 CHAR8[20] FruString; 250 } 251 /// The validation bit mask indicates whether or not each of the following fields are 252 /// valid in Proessor Generic Error section. 253 ///@{ 254 enum EFI_GENERIC_ERROR_PROC_TYPE_VALID = BIT0; 255 enum EFI_GENERIC_ERROR_PROC_ISA_VALID = BIT1; 256 enum EFI_GENERIC_ERROR_PROC_ERROR_TYPE_VALID = BIT2; 257 enum EFI_GENERIC_ERROR_PROC_OPERATION_VALID = BIT3; 258 enum EFI_GENERIC_ERROR_PROC_FLAGS_VALID = BIT4; 259 enum EFI_GENERIC_ERROR_PROC_LEVEL_VALID = BIT5; 260 enum EFI_GENERIC_ERROR_PROC_VERSION_VALID = BIT6; 261 enum EFI_GENERIC_ERROR_PROC_BRAND_VALID = BIT7; 262 enum EFI_GENERIC_ERROR_PROC_ID_VALID = BIT8; 263 enum EFI_GENERIC_ERROR_PROC_TARGET_ADDR_VALID = BIT9; 264 enum EFI_GENERIC_ERROR_PROC_REQUESTER_ID_VALID = BIT10; 265 enum EFI_GENERIC_ERROR_PROC_RESPONDER_ID_VALID = BIT11; 266 enum EFI_GENERIC_ERROR_PROC_INST_IP_VALID = BIT12; 267 ///@} 268 /// The type of the processor architecture in Proessor Generic Error section. 269 ///@{ 270 enum EFI_GENERIC_ERROR_PROC_TYPE_IA32_X64 = 0x00; 271 enum EFI_GENERIC_ERROR_PROC_TYPE_IA64 = 0x01; 272 ///@} 273 /// The type of the instruction set executing when the error occurred in Proessor 274 /// Generic Error section. 275 ///@{ 276 enum EFI_GENERIC_ERROR_PROC_ISA_IA32 = 0x00; 277 enum EFI_GENERIC_ERROR_PROC_ISA_IA64 = 0x01; 278 enum EFI_GENERIC_ERROR_PROC_ISA_X64 = 0x02; 279 ///@} 280 /// The type of error that occurred in Proessor Generic Error section. 281 ///@{ 282 enum EFI_GENERIC_ERROR_PROC_ERROR_TYPE_UNKNOWN = 0x00; 283 enum EFI_GENERIC_ERROR_PROC_ERROR_TYPE_CACHE = 0x01; 284 enum EFI_GENERIC_ERROR_PROC_ERROR_TYPE_TLB = 0x02; 285 enum EFI_GENERIC_ERROR_PROC_ERROR_TYPE_BUS = 0x04; 286 enum EFI_GENERIC_ERROR_PROC_ERROR_TYPE_MICRO_ARCH = 0x08; 287 ///@} 288 /// The type of operation in Proessor Generic Error section. 289 ///@{ 290 enum EFI_GENERIC_ERROR_PROC_OPERATION_GENERIC = 0x00; 291 enum EFI_GENERIC_ERROR_PROC_OPERATION_DATA_READ = 0x01; 292 enum EFI_GENERIC_ERROR_PROC_OPERATION_DATA_WRITE = 0x02; 293 enum EFI_GENERIC_ERROR_PROC_OPERATION_INSTRUCTION_EXEC = 0x03; 294 ///@} 295 /// Flags bit mask indicates additional information about the error in Proessor Generic 296 /// Error section 297 ///@{ 298 enum EFI_GENERIC_ERROR_PROC_FLAGS_RESTARTABLE = BIT0; 299 enum EFI_GENERIC_ERROR_PROC_FLAGS_PRECISE_IP = BIT1; 300 enum EFI_GENERIC_ERROR_PROC_FLAGS_OVERFLOW = BIT2; 301 enum EFI_GENERIC_ERROR_PROC_FLAGS_CORRECTED = BIT3; 302 ///@} 303 /// Processor Generic Error Section 304 /// describes processor reported hardware errors for logical processors in the system. 305 struct EFI_PROCESSOR_GENERIC_ERROR_DATA 306 { 307 align(1): 308 UINT64 ValidFields; 309 UINT8 Type; 310 UINT8 Isa; 311 UINT8 ErrorType; 312 UINT8 Operation; 313 UINT8 Flags; 314 UINT8 Level; 315 UINT16 Resv1; 316 UINT64 VersionInfo; 317 CHAR8[128] BrandString; 318 UINT64 ApicId; 319 UINT64 TargetAddr; 320 UINT64 RequestorId; 321 UINT64 ResponderId; 322 UINT64 InstructionIP; 323 } 324 /// IA32 and x64 Specific definitions. 325 /// GUID value indicating the type of Processor Error Information structure 326 /// in IA32/X64 Processor Error Information Structure. 327 ///@{ 328 enum EFI_GUID EFI_IA32_X64_ERROR_TYPE_CACHE_CHECK_GUID = EFI_GUID(0xA55701F5, 329 0xE3EF, 0x43de, [0xAC, 0x72, 0x24, 0x9B, 0x57, 0x3F, 0xAD, 0x2C]); 330 enum EFI_GUID EFI_IA32_X64_ERROR_TYPE_TLB_CHECK_GUID = EFI_GUID(0xFC06B535, 331 0x5E1F, 0x4562, [0x9F, 0x25, 0x0A, 0x3B, 0x9A, 0xDB, 0x63, 0xC3]); 332 enum EFI_GUID EFI_IA32_X64_ERROR_TYPE_BUS_CHECK_GUID = EFI_GUID(0x1CF3F8B3, 333 0xC5B1, 0x49a2, [0xAA, 0x59, 0x5E, 0xEF, 0x92, 0xFF, 0xA6, 0x3C]); 334 enum EFI_GUID EFI_IA32_X64_ERROR_TYPE_MS_CHECK_GUID = EFI_GUID(0x48AB7F57, 335 0xDC34, 0x4f6c, [0xA7, 0xD3, 0xB0, 0xB5, 0xB0, 0xA7, 0x43, 0x14]); 336 ///@} 337 /// The validation bit mask indicates which fields in the Cache Check structure 338 /// are valid. 339 ///@{ 340 enum EFI_CACHE_CHECK_TRANSACTION_TYPE_VALID = BIT0; 341 enum EFI_CACHE_CHECK_OPERATION_VALID = BIT1; 342 enum EFI_CACHE_CHECK_LEVEL_VALID = BIT2; 343 enum EFI_CACHE_CHECK_CONTEXT_CORRUPT_VALID = BIT3; 344 enum EFI_CACHE_CHECK_UNCORRECTED_VALID = BIT4; 345 enum EFI_CACHE_CHECK_PRECISE_IP_VALID = BIT5; 346 enum EFI_CACHE_CHECK_RESTARTABLE_VALID = BIT6; 347 enum EFI_CACHE_CHECK_OVERFLOW_VALID = BIT7; 348 ///@} 349 /// Type of cache error in the Cache Check structure 350 ///@{ 351 enum EFI_CACHE_CHECK_ERROR_TYPE_INSTRUCTION = 0; 352 enum EFI_CACHE_CHECK_ERROR_TYPE_DATA_ACCESS = 1; 353 enum EFI_CACHE_CHECK_ERROR_TYPE_GENERIC = 2; 354 ///@} 355 /// Type of cache operation that caused the error in the Cache 356 /// Check structure 357 ///@{ 358 enum EFI_CACHE_CHECK_OPERATION_TYPE_GENERIC = 0; 359 enum EFI_CACHE_CHECK_OPERATION_TYPE_GENERIC_READ = 1; 360 enum EFI_CACHE_CHECK_OPERATION_TYPE_GENERIC_WRITE = 2; 361 enum EFI_CACHE_CHECK_OPERATION_TYPE_DATA_READ = 3; 362 enum EFI_CACHE_CHECK_OPERATION_TYPE_DATA_WRITE = 4; 363 enum EFI_CACHE_CHECK_OPERATION_TYPE_INSTRUCTION_FETCH = 5; 364 enum EFI_CACHE_CHECK_OPERATION_TYPE_PREFETCH = 6; 365 enum EFI_CACHE_CHECK_OPERATION_TYPE_EVICTION = 7; 366 enum EFI_CACHE_CHECK_OPERATION_TYPE_SNOOP = 8; 367 ///@} 368 /// IA32/X64 Cache Check Structure 369 struct EFI_IA32_X64_CACHE_CHECK_INFO 370 { 371 align(1): 372 mixin(bitfields!(UINT64, "ValidFields", 16, UINT64, "TransactionType", 2, 373 UINT64, "Operation", 4, UINT64, "Leve", 3, UINT64, "ContextCorrupt"w, 374 1, UINT64, "ErrorUncorrected", 1, UINT64, "PreciseIp", 1, UINT64, 375 "RestartableIp", 1, UINT64, "Overflow", 1, UINT64, "Resv1", 34)); 376 } 377 /// The validation bit mask indicates which fields in the TLB Check structure 378 /// are valid. 379 ///@{ 380 enum EFI_TLB_CHECK_TRANSACTION_TYPE_VALID = BIT0; 381 enum EFI_TLB_CHECK_OPERATION_VALID = BIT1; 382 enum EFI_TLB_CHECK_LEVEL_VALID = BIT2; 383 enum EFI_TLB_CHECK_CONTEXT_CORRUPT_VALID = BIT3; 384 enum EFI_TLB_CHECK_UNCORRECTED_VALID = BIT4; 385 enum EFI_TLB_CHECK_PRECISE_IP_VALID = BIT5; 386 enum EFI_TLB_CHECK_RESTARTABLE_VALID = BIT6; 387 enum EFI_TLB_CHECK_OVERFLOW_VALID = BIT7; 388 ///@} 389 /// Type of cache error in the TLB Check structure 390 ///@{ 391 enum EFI_TLB_CHECK_ERROR_TYPE_INSTRUCTION = 0; 392 enum EFI_TLB_CHECK_ERROR_TYPE_DATA_ACCESS = 1; 393 enum EFI_TLB_CHECK_ERROR_TYPE_GENERIC = 2; 394 ///@} 395 /// Type of cache operation that caused the error in the TLB 396 /// Check structure 397 ///@{ 398 enum EFI_TLB_CHECK_OPERATION_TYPE_GENERIC = 0; 399 enum EFI_TLB_CHECK_OPERATION_TYPE_GENERIC_READ = 1; 400 enum EFI_TLB_CHECK_OPERATION_TYPE_GENERIC_WRITE = 2; 401 enum EFI_TLB_CHECK_OPERATION_TYPE_DATA_READ = 3; 402 enum EFI_TLB_CHECK_OPERATION_TYPE_DATA_WRITE = 4; 403 enum EFI_TLB_CHECK_OPERATION_TYPE_INST_FETCH = 5; 404 enum EFI_TLB_CHECK_OPERATION_TYPE_PREFETCH = 6; 405 ///@} 406 /// IA32/X64 TLB Check Structure 407 struct EFI_IA32_X64_TLB_CHECK_INFO 408 { 409 align(1): 410 mixin(bitfields!(UINT64, "ValidFields", 16, UINT64, "TransactionType", 2, 411 UINT64, "Operation", 4, UINT64, "Leve", 3, UINT64, "ContextCorrupt"w, 412 1, UINT64, "ErrorUncorrected", 1, UINT64, "PreciseIp", 1, UINT64, 413 "RestartableIp", 1, UINT64, "Overflow", 1, UINT64, "Resv1", 34)); 414 } 415 /// The validation bit mask indicates which fields in the MS Check structure 416 /// are valid. 417 ///@{ 418 enum EFI_BUS_CHECK_TRANSACTION_TYPE_VALID = BIT0; 419 enum EFI_BUS_CHECK_OPERATION_VALID = BIT1; 420 enum EFI_BUS_CHECK_LEVEL_VALID = BIT2; 421 enum EFI_BUS_CHECK_CONTEXT_CORRUPT_VALID = BIT3; 422 enum EFI_BUS_CHECK_UNCORRECTED_VALID = BIT4; 423 enum EFI_BUS_CHECK_PRECISE_IP_VALID = BIT5; 424 enum EFI_BUS_CHECK_RESTARTABLE_VALID = BIT6; 425 enum EFI_BUS_CHECK_OVERFLOW_VALID = BIT7; 426 enum EFI_BUS_CHECK_PARTICIPATION_TYPE_VALID = BIT8; 427 enum EFI_BUS_CHECK_TIME_OUT_VALID = BIT9; 428 enum EFI_BUS_CHECK_ADDRESS_SPACE_VALID = BIT10; 429 ///@} 430 /// Type of cache error in the Bus Check structure 431 ///@{ 432 enum EFI_BUS_CHECK_ERROR_TYPE_INSTRUCTION = 0; 433 enum EFI_BUS_CHECK_ERROR_TYPE_DATA_ACCESS = 1; 434 enum EFI_BUS_CHECK_ERROR_TYPE_GENERIC = 2; 435 ///@} 436 /// Type of cache operation that caused the error in the Bus 437 /// Check structure 438 ///@{ 439 enum EFI_BUS_CHECK_OPERATION_TYPE_GENERIC = 0; 440 enum EFI_BUS_CHECK_OPERATION_TYPE_GENERIC_READ = 1; 441 enum EFI_BUS_CHECK_OPERATION_TYPE_GENERIC_WRITE = 2; 442 enum EFI_BUS_CHECK_OPERATION_TYPE_DATA_READ = 3; 443 enum EFI_BUS_CHECK_OPERATION_TYPE_DATA_WRITE = 4; 444 enum EFI_BUS_CHECK_OPERATION_TYPE_INST_FETCH = 5; 445 enum EFI_BUS_CHECK_OPERATION_TYPE_PREFETCH = 6; 446 ///@} 447 /// Type of Participation 448 ///@{ 449 enum EFI_BUS_CHECK_PARTICIPATION_TYPE_REQUEST = 0; 450 enum EFI_BUS_CHECK_PARTICIPATION_TYPE_RESPONDED = 1; 451 enum EFI_BUS_CHECK_PARTICIPATION_TYPE_OBSERVED = 2; 452 enum EFI_BUS_CHECK_PARTICIPATION_TYPE_GENERIC = 3; 453 ///@} 454 /// Type of Address Space 455 ///@{ 456 enum EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_MEMORY = 0; 457 enum EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_RESERVED = 1; 458 enum EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_IO = 2; 459 enum EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_OTHER = 3; 460 ///@} 461 /// IA32/X64 Bus Check Structure 462 struct EFI_IA32_X64_BUS_CHECK_INFO 463 { 464 align(1): 465 mixin(bitfields!(UINT64, "ValidFields", 16, UINT64, "TransactionType", 2, 466 UINT64, "Operation", 4, UINT64, "Leve", 3, UINT64, "ContextCorrupt"w, 467 1, UINT64, "ErrorUncorrected", 1, UINT64, "PreciseIp", 1, UINT64, 468 "RestartableIp", 1, UINT64, "Overflow", 1, UINT64, "ParticipationType", 469 2, UINT64, "TimeOut", 1, UINT64, "AddressSpace", 2, UINT64, "Resv1", 29)); 470 } 471 /// The validation bit mask indicates which fields in the MS Check structure 472 /// are valid. 473 ///@{ 474 enum EFI_MS_CHECK_ERROR_TYPE_VALID = BIT0; 475 enum EFI_MS_CHECK_CONTEXT_CORRUPT_VALID = BIT1; 476 enum EFI_MS_CHECK_UNCORRECTED_VALID = BIT2; 477 enum EFI_MS_CHECK_PRECISE_IP_VALID = BIT3; 478 enum EFI_MS_CHECK_RESTARTABLE_VALID = BIT4; 479 enum EFI_MS_CHECK_OVERFLOW_VALID = BIT5; 480 ///@} 481 /// Error type identifies the operation that caused the error. 482 ///@{ 483 enum EFI_MS_CHECK_ERROR_TYPE_NO = 0; 484 enum EFI_MS_CHECK_ERROR_TYPE_UNCLASSIFIED = 1; 485 enum EFI_MS_CHECK_ERROR_TYPE_MICROCODE_PARITY = 2; 486 enum EFI_MS_CHECK_ERROR_TYPE_EXTERNAL = 3; 487 enum EFI_MS_CHECK_ERROR_TYPE_FRC = 4; 488 enum EFI_MS_CHECK_ERROR_TYPE_INTERNAL_UNCLASSIFIED = 5; 489 ///@} 490 /// IA32/X64 MS Check Field Description 491 struct EFI_IA32_X64_MS_CHECK_INFO 492 { 493 align(1): 494 mixin(bitfields!(UINT64, "ValidFields", 16, UINT64, "ErrorType", 3, 495 UINT64, "ContextCorrupt", 1, UINT64, "ErrorUncorrected", 1, UINT64, 496 "PreciseIp", 1, UINT64, "RestartableIp", 1, UINT64, "Overflow", 1, UINT64, 497 "Resv1", 40)); 498 } 499 /// IA32/X64 Check Information Item 500 union EFI_IA32_X64_CHECK_INFO_ITEM 501 { 502 EFI_IA32_X64_CACHE_CHECK_INFO CacheCheck; 503 EFI_IA32_X64_TLB_CHECK_INFO TlbCheck; 504 EFI_IA32_X64_BUS_CHECK_INFO BusCheck; 505 EFI_IA32_X64_MS_CHECK_INFO MsCheck; 506 UINT64 Data64; 507 } 508 /// The validation bit mask indicates which fields in the IA32/X64 Processor Error 509 /// Information Structure are valid. 510 ///@{ 511 enum EFI_IA32_X64_ERROR_PROC_CHECK_INFO_VALID = BIT0; 512 enum EFI_IA32_X64_ERROR_PROC_TARGET_ADDR_VALID = BIT1; 513 enum EFI_IA32_X64_ERROR_PROC_REQUESTER_ID_VALID = BIT2; 514 enum EFI_IA32_X64_ERROR_PROC_RESPONDER_ID_VALID = BIT3; 515 enum EFI_IA32_X64_ERROR_PROC_INST_IP_VALID = BIT4; 516 ///@} 517 /// IA32/X64 Processor Error Information Structure 518 struct EFI_IA32_X64_PROCESS_ERROR_INFO 519 { 520 align(1): 521 EFI_GUID ErrorType; 522 UINT64 ValidFields; 523 EFI_IA32_X64_CHECK_INFO_ITEM CheckInfo; 524 UINT64 TargetId; 525 UINT64 RequestorId; 526 UINT64 ResponderId; 527 UINT64 InstructionIP; 528 } 529 /// IA32/X64 Processor Context Information Structure 530 struct EFI_IA32_X64_PROCESSOR_CONTEXT_INFO 531 { 532 align(1): 533 UINT16 RegisterType; 534 UINT16 ArraySize; 535 UINT32 MsrAddress; 536 UINT64 MmRegisterAddress; 537 // 538 // This field will provide the contents of the actual registers or raw data. 539 // The number of Registers or size of the raw data reported is determined 540 // by (Array Size / 8) or otherwise specified by the context structure type 541 // definition. 542 // 543 } 544 /// Register Context Type 545 ///@{ 546 enum EFI_REG_CONTEXT_TYPE_UNCLASSIFIED = 0x0000; 547 enum EFI_REG_CONTEXT_TYPE_MSR = 0x0001; 548 enum EFI_REG_CONTEXT_TYPE_IA32 = 0x0002; 549 enum EFI_REG_CONTEXT_TYPE_X64 = 0x0003; 550 enum EFI_REG_CONTEXT_TYPE_FXSAVE = 0x0004; 551 enum EFI_REG_CONTEXT_TYPE_DR_IA32 = 0x0005; 552 enum EFI_REG_CONTEXT_TYPE_DR_X64 = 0x0006; 553 enum EFI_REG_CONTEXT_TYPE_MEM_MAP = 0x0007; 554 ///@} 555 /// IA32 Register State 556 struct EFI_CONTEXT_IA32_REGISTER_STATE 557 { 558 align(1): 559 UINT32 Eax; 560 UINT32 Ebx; 561 UINT32 Ecx; 562 UINT32 Edx; 563 UINT32 Esi; 564 UINT32 Edi; 565 UINT32 Ebp; 566 UINT32 Esp; 567 UINT16 Cs; 568 UINT16 Ds; 569 UINT16 Ss; 570 UINT16 Es; 571 UINT16 Fs; 572 UINT16 Gs; 573 UINT32 Eflags; 574 UINT32 Eip; 575 UINT32 Cr0; 576 UINT32 Cr1; 577 UINT32 Cr2; 578 UINT32 Cr3; 579 UINT32 Cr4; 580 UINT32[2] Gdtr; 581 UINT32[2] Idtr; 582 UINT16 Ldtr; 583 UINT16 Tr; 584 } 585 /// X64 Register State 586 struct EFI_CONTEXT_X64_REGISTER_STATE 587 { 588 align(1): 589 UINT64 Rax; 590 UINT64 Rbx; 591 UINT64 Rcx; 592 UINT64 Rdx; 593 UINT64 Rsi; 594 UINT64 Rdi; 595 UINT64 Rbp; 596 UINT64 Rsp; 597 UINT64 R8; 598 UINT64 R9; 599 UINT64 R10; 600 UINT64 R11; 601 UINT64 R12; 602 UINT64 R13; 603 UINT64 R14; 604 UINT64 R15; 605 UINT16 Cs; 606 UINT16 Ds; 607 UINT16 Ss; 608 UINT16 Es; 609 UINT16 Fs; 610 UINT16 Gs; 611 UINT32 Resv1; 612 UINT64 Rflags; 613 UINT64 Rip; 614 UINT64 Cr0; 615 UINT64 Cr1; 616 UINT64 Cr2; 617 UINT64 Cr3; 618 UINT64 Cr4; 619 UINT64[2] Gdtr; 620 UINT64[2] Idtr; 621 UINT16 Ldtr; 622 UINT16 Tr; 623 } 624 /// The validation bit mask indicates each of the following field is in IA32/X64 625 /// Processor Error Section. 626 struct EFI_IA32_X64_VALID_BITS 627 { 628 align(1): 629 mixin(bitfields!(UINT64, "ApicIdValid", 1, UINT64, "CpuIdInforValid", 1, 630 UINT64, "ErrorInfoNum", 6, UINT64, "ContextNum", 6, UINT64, "Resv1", 50)); 631 } 632 /// Error Status Fields 633 struct EFI_GENERIC_ERROR_STATUS 634 { 635 align(1): 636 mixin(bitfields!(UINT64, "Resv1", 8, UINT64, "Type", 8, UINT64, 637 "AddressSigna", 1, UINT64, "ControlSignal", 1, UINT64, "DataSignal"w, 638 1, UINT64, "DetectedByResponder", 1, UINT64, "DetectedByRequester", 1, 639 UINT64, "FirstError", 1, UINT64, "OverflowNotLogged", 1, UINT64, "Resv2", 41)); 640 } 641 /// Error Type 642 alias EFI_GENERIC_ERROR_STATUS_ERROR_TYPE = UINT32; 643 enum : EFI_GENERIC_ERROR_STATUS_ERROR_TYPE 644 { 645 /// 646 /// General Internal errors 647 /// 648 ErrorInternal = 1, 649 ErrorBus = 16, 650 /// 651 /// Component Internal errors 652 /// 653 ErrorMemStorage = 4, // Error in memory device 654 ErrorTlbStorage = 5, // TLB error in cache 655 ErrorCacheStorage = 6, 656 ErrorFunctionalUnit = 7, 657 ErrorSelftest = 8, 658 ErrorOverflow = 9, 659 /// 660 /// Bus internal errors 661 /// 662 ErrorVirtualMap = 17, 663 ErrorAccessInvalid = 18, // Improper access 664 ErrorUnimplAccess = 19, // Unimplemented memory access 665 ErrorLossOfLockstep = 20, 666 ErrorResponseInvalid = 21, // Response not associated with request 667 ErrorParity = 22, 668 ErrorProtocol = 23, 669 ErrorPath = 24, // Detected path error 670 ErrorTimeout = 25, // Bus timeout 671 ErrorPoisoned = 26 // Read data poisoned 672 } 673 /// Validation bit mask indicates which fields in the memory error record are valid 674 /// in Memory Error section 675 ///@{ 676 enum EFI_PLATFORM_MEMORY_ERROR_STATUS_VALID = BIT0; 677 enum EFI_PLATFORM_MEMORY_PHY_ADDRESS_VALID = BIT1; 678 enum EFI_PLATFORM_MEMORY_PHY_ADDRESS_MASK_VALID = BIT2; 679 enum EFI_PLATFORM_MEMORY_NODE_VALID = BIT3; 680 enum EFI_PLATFORM_MEMORY_CARD_VALID = BIT4; 681 enum EFI_PLATFORM_MEMORY_MODULE_VALID = BIT5; 682 enum EFI_PLATFORM_MEMORY_BANK_VALID = BIT6; 683 enum EFI_PLATFORM_MEMORY_DEVICE_VALID = BIT7; 684 enum EFI_PLATFORM_MEMORY_ROW_VALID = BIT8; 685 enum EFI_PLATFORM_MEMORY_COLUMN_VALID = BIT9; 686 enum EFI_PLATFORM_MEMORY_BIT_POS_VALID = BIT10; 687 enum EFI_PLATFORM_MEMORY_REQUESTOR_ID_VALID = BIT11; 688 enum EFI_PLATFORM_MEMORY_RESPONDER_ID_VALID = BIT12; 689 enum EFI_PLATFORM_MEMORY_TARGET_ID_VALID = BIT13; 690 enum EFI_PLATFORM_MEMORY_ERROR_TYPE_VALID = BIT14; 691 enum EFI_PLATFORM_MEMORY_ERROR_RANK_NUM_VALID = BIT15; 692 enum EFI_PLATFORM_MEMORY_ERROR_CARD_HANDLE_VALID = BIT16; 693 enum EFI_PLATFORM_MEMORY_ERROR_MODULE_HANDLE_VALID = BIT17; 694 enum EFI_PLATFORM_MEMORY_ERROR_EXTENDED_ROW_BIT_16_17_VALID = BIT18; 695 enum EFI_PLATFORM_MEMORY_ERROR_BANK_GROUP_VALID = BIT19; 696 enum EFI_PLATFORM_MEMORY_ERROR_BANK_ADDRESS_VALID = BIT20; 697 enum EFI_PLATFORM_MEMORY_ERROR_CHIP_IDENTIFICATION_VALID = BIT21; 698 ///@} 699 /// Memory Error Type identifies the type of error that occurred in Memory 700 /// Error section 701 ///@{ 702 enum EFI_PLATFORM_MEMORY_ERROR_UNKNOWN = 0x00; 703 enum EFI_PLATFORM_MEMORY_ERROR_NONE = 0x01; 704 enum EFI_PLATFORM_MEMORY_ERROR_SINGLEBIT_ECC = 0x02; 705 enum EFI_PLATFORM_MEMORY_ERROR_MLTIBIT_ECC = 0x03; 706 enum EFI_PLATFORM_MEMORY_ERROR_SINGLESYMBOLS_CHIPKILL = 0x04; 707 enum EFI_PLATFORM_MEMORY_ERROR_MULTISYMBOL_CHIPKILL = 0x05; 708 enum EFI_PLATFORM_MEMORY_ERROR_MATER_ABORT = 0x06; 709 enum EFI_PLATFORM_MEMORY_ERROR_TARGET_ABORT = 0x07; 710 enum EFI_PLATFORM_MEMORY_ERROR_PARITY = 0x08; 711 enum EFI_PLATFORM_MEMORY_ERROR_WDT = 0x09; 712 enum EFI_PLATFORM_MEMORY_ERROR_INVALID_ADDRESS = 0x0A; 713 enum EFI_PLATFORM_MEMORY_ERROR_MIRROR_FAILED = 0x0B; 714 enum EFI_PLATFORM_MEMORY_ERROR_SPARING = 0x0C; 715 enum EFI_PLATFORM_MEMORY_ERROR_SCRUB_CORRECTED = 0x0D; 716 enum EFI_PLATFORM_MEMORY_ERROR_SCRUB_UNCORRECTED = 0x0E; 717 enum EFI_PLATFORM_MEMORY_ERROR_MEMORY_MAP_EVENT = 0x0F; 718 ///@} 719 /// Memory Error Section 720 struct EFI_PLATFORM_MEMORY_ERROR_DATA 721 { 722 align(1): 723 UINT64 ValidFields; 724 EFI_GENERIC_ERROR_STATUS ErrorStatus; 725 UINT64 PhysicalAddress; // Error physical address 726 UINT64 PhysicalAddressMask; // Grnaularity 727 UINT16 Node; // Node # 728 UINT16 Card; 729 UINT16 ModuleRank; // Module or Rank# 730 UINT16 Bank; 731 UINT16 Device; 732 UINT16 Row; 733 UINT16 Column; 734 UINT16 BitPosition; 735 UINT64 RequestorId; 736 UINT64 ResponderId; 737 UINT64 TargetId; 738 UINT8 ErrorType; 739 UINT8 Extended; 740 UINT16 RankNum; 741 UINT16 CardHandle; 742 UINT16 ModuleHandle; 743 } 744 /// Validation bit mask indicates which fields in the memory error record 2 are valid 745 /// in Memory Error section 2 746 ///@{ 747 enum EFI_PLATFORM_MEMORY2_ERROR_STATUS_VALID = BIT0; 748 enum EFI_PLATFORM_MEMORY2_PHY_ADDRESS_VALID = BIT1; 749 enum EFI_PLATFORM_MEMORY2_PHY_ADDRESS_MASK_VALID = BIT2; 750 enum EFI_PLATFORM_MEMORY2_NODE_VALID = BIT3; 751 enum EFI_PLATFORM_MEMORY2_CARD_VALID = BIT4; 752 enum EFI_PLATFORM_MEMORY2_MODULE_VALID = BIT5; 753 enum EFI_PLATFORM_MEMORY2_BANK_VALID = BIT6; 754 enum EFI_PLATFORM_MEMORY2_DEVICE_VALID = BIT7; 755 enum EFI_PLATFORM_MEMORY2_ROW_VALID = BIT8; 756 enum EFI_PLATFORM_MEMORY2_COLUMN_VALID = BIT9; 757 enum EFI_PLATFORM_MEMORY2_RANK_VALID = BIT10; 758 enum EFI_PLATFORM_MEMORY2_BIT_POS_VALID = BIT11; 759 enum EFI_PLATFORM_MEMORY2_CHIP_ID_VALID = BIT12; 760 enum EFI_PLATFORM_MEMORY2_MEMORY_ERROR_TYPE_VALID = BIT13; 761 enum EFI_PLATFORM_MEMORY2_STATUS_VALID = BIT14; 762 enum EFI_PLATFORM_MEMORY2_REQUESTOR_ID_VALID = BIT15; 763 enum EFI_PLATFORM_MEMORY2_RESPONDER_ID_VALID = BIT16; 764 enum EFI_PLATFORM_MEMORY2_TARGET_ID_VALID = BIT17; 765 enum EFI_PLATFORM_MEMORY2_CARD_HANDLE_VALID = BIT18; 766 enum EFI_PLATFORM_MEMORY2_MODULE_HANDLE_VALID = BIT19; 767 enum EFI_PLATFORM_MEMORY2_BANK_GROUP_VALID = BIT20; 768 enum EFI_PLATFORM_MEMORY2_BANK_ADDRESS_VALID = BIT21; 769 ///@} 770 /// Memory Error Type identifies the type of error that occurred in Memory 771 /// Error section 2 772 ///@{ 773 enum EFI_PLATFORM_MEMORY2_ERROR_UNKNOWN = 0x00; 774 enum EFI_PLATFORM_MEMORY2_ERROR_NONE = 0x01; 775 enum EFI_PLATFORM_MEMORY2_ERROR_SINGLEBIT_ECC = 0x02; 776 enum EFI_PLATFORM_MEMORY2_ERROR_MLTIBIT_ECC = 0x03; 777 enum EFI_PLATFORM_MEMORY2_ERROR_SINGLESYMBOL_CHIPKILL = 0x04; 778 enum EFI_PLATFORM_MEMORY2_ERROR_MULTISYMBOL_CHIPKILL = 0x05; 779 enum EFI_PLATFORM_MEMORY2_ERROR_MASTER_ABORT = 0x06; 780 enum EFI_PLATFORM_MEMORY2_ERROR_TARGET_ABORT = 0x07; 781 enum EFI_PLATFORM_MEMORY2_ERROR_PARITY = 0x08; 782 enum EFI_PLATFORM_MEMORY2_ERROR_WDT = 0x09; 783 enum EFI_PLATFORM_MEMORY2_ERROR_INVALID_ADDRESS = 0x0A; 784 enum EFI_PLATFORM_MEMORY2_ERROR_MIRROR_BROKEN = 0x0B; 785 enum EFI_PLATFORM_MEMORY2_ERROR_MEMORY_SPARING = 0x0C; 786 enum EFI_PLATFORM_MEMORY2_ERROR_SCRUB_CORRECTED = 0x0D; 787 enum EFI_PLATFORM_MEMORY2_ERROR_SCRUB_UNCORRECTED = 0x0E; 788 enum EFI_PLATFORM_MEMORY2_ERROR_MEMORY_MAP_EVENT = 0x0F; 789 ///@} 790 /// Memory Error Section 2 791 struct EFI_PLATFORM_MEMORY2_ERROR_DATA 792 { 793 align(1): 794 UINT64 ValidFields; 795 EFI_GENERIC_ERROR_STATUS ErrorStatus; 796 UINT64 PhysicalAddress; // Error physical address 797 UINT64 PhysicalAddressMask; // Grnaularity 798 UINT16 Node; // Node # 799 UINT16 Card; 800 UINT16 Module; // Module or Rank# 801 UINT16 Bank; 802 UINT32 Device; 803 UINT32 Row; 804 UINT32 Column; 805 UINT32 Rank; 806 UINT32 BitPosition; 807 UINT8 ChipId; 808 UINT8 MemErrorType; 809 UINT8 Status; 810 UINT8 Reserved; 811 UINT64 RequestorId; 812 UINT64 ResponderId; 813 UINT64 TargetId; 814 UINT32 CardHandle; 815 UINT32 ModuleHandle; 816 } 817 /// Validation bits mask indicates which of the following fields is valid 818 /// in PCI Express Error Record. 819 ///@{ 820 enum EFI_PCIE_ERROR_PORT_TYPE_VALID = BIT0; 821 enum EFI_PCIE_ERROR_VERSION_VALID = BIT1; 822 enum EFI_PCIE_ERROR_COMMAND_STATUS_VALID = BIT2; 823 enum EFI_PCIE_ERROR_DEVICE_ID_VALID = BIT3; 824 enum EFI_PCIE_ERROR_SERIAL_NO_VALID = BIT4; 825 enum EFI_PCIE_ERROR_BRIDGE_CRL_STS_VALID = BIT5; 826 enum EFI_PCIE_ERROR_CAPABILITY_INFO_VALID = BIT6; 827 enum EFI_PCIE_ERROR_AER_INFO_VALID = BIT7; 828 ///@} 829 /// PCIe Device/Port Type as defined in the PCI Express capabilities register 830 ///@{ 831 enum EFI_PCIE_ERROR_PORT_PCIE_ENDPOINT = 0x00000000; 832 enum EFI_PCIE_ERROR_PORT_PCI_ENDPOINT = 0x00000001; 833 enum EFI_PCIE_ERROR_PORT_ROOT_PORT = 0x00000004; 834 enum EFI_PCIE_ERROR_PORT_UPSWITCH_PORT = 0x00000005; 835 enum EFI_PCIE_ERROR_PORT_DOWNSWITCH_PORT = 0x00000006; 836 enum EFI_PCIE_ERROR_PORT_PCIE_TO_PCI_BRIDGE = 0x00000007; 837 enum EFI_PCIE_ERROR_PORT_PCI_TO_PCIE_BRIDGE = 0x00000008; 838 enum EFI_PCIE_ERROR_PORT_ROOT_INT_ENDPOINT = 0x00000009; 839 enum EFI_PCIE_ERROR_PORT_ROOT_EVENT_COLLECTOR = 0x0000000A; 840 ///@} 841 /// PCI Slot number 842 struct EFI_GENERIC_ERROR_PCI_SLOT 843 { 844 align(1): 845 mixin(bitfields!(UINT16, "Resv1", 3, UINT16, "Number", 13)); 846 } 847 /// PCIe Root Port PCI/bridge PCI compatible device number and 848 /// bus number information to uniquely identify the root port or 849 /// bridge. Default values for both the bus numbers is zero. 850 struct EFI_GENERIC_ERROR_PCIE_DEV_BRIDGE_ID 851 { 852 align(1): 853 UINT16 VendorId; 854 UINT16 DeviceId; 855 UINT8[3] ClassCode; 856 UINT8 Function; 857 UINT8 Device; 858 UINT16 Segment; 859 UINT8 PrimaryOrDeviceBus; 860 UINT8 SecondaryBus; 861 EFI_GENERIC_ERROR_PCI_SLOT Slot; 862 UINT8 Resv1; 863 } 864 /// PCIe Capability Structure 865 struct EFI_PCIE_ERROR_DATA_CAPABILITY 866 { 867 align(1): 868 UINT8[60] PcieCap; 869 } 870 /// PCIe Advanced Error Reporting Extended Capability Structure. 871 struct EFI_PCIE_ERROR_DATA_AER 872 { 873 align(1): 874 UINT8[96] PcieAer; 875 } 876 /// PCI Express Error Record 877 struct EFI_PCIE_ERROR_DATA 878 { 879 align(1): 880 UINT64 ValidFields; 881 UINT32 PortType; 882 UINT32 Version; 883 UINT32 CommandStatus; 884 UINT32 Resv2; 885 EFI_GENERIC_ERROR_PCIE_DEV_BRIDGE_ID DevBridge; 886 UINT64 SerialNo; 887 UINT32 BridgeControlStatus; 888 EFI_PCIE_ERROR_DATA_CAPABILITY Capability; 889 EFI_PCIE_ERROR_DATA_AER AerInfo; 890 } 891 /// Validation bits Indicates which of the following fields is valid 892 /// in PCI/PCI-X Bus Error Section. 893 ///@{ 894 enum EFI_PCI_PCIX_BUS_ERROR_STATUS_VALID = BIT0; 895 enum EFI_PCI_PCIX_BUS_ERROR_TYPE_VALID = BIT1; 896 enum EFI_PCI_PCIX_BUS_ERROR_BUS_ID_VALID = BIT2; 897 enum EFI_PCI_PCIX_BUS_ERROR_BUS_ADDRESS_VALID = BIT3; 898 enum EFI_PCI_PCIX_BUS_ERROR_BUS_DATA_VALID = BIT4; 899 enum EFI_PCI_PCIX_BUS_ERROR_COMMAND_VALID = BIT5; 900 enum EFI_PCI_PCIX_BUS_ERROR_REQUESTOR_ID_VALID = BIT6; 901 enum EFI_PCI_PCIX_BUS_ERROR_COMPLETER_ID_VALID = BIT7; 902 enum EFI_PCI_PCIX_BUS_ERROR_TARGET_ID_VALID = BIT8; 903 ///@} 904 /// PCI Bus Error Type in PCI/PCI-X Bus Error Section 905 ///@{ 906 enum EFI_PCI_PCIX_BUS_ERROR_UNKNOWN = 0x0000; 907 enum EFI_PCI_PCIX_BUS_ERROR_DATA_PARITY = 0x0001; 908 enum EFI_PCI_PCIX_BUS_ERROR_SYSTEM = 0x0002; 909 enum EFI_PCI_PCIX_BUS_ERROR_MASTER_ABORT = 0x0003; 910 enum EFI_PCI_PCIX_BUS_ERROR_BUS_TIMEOUT = 0x0004; 911 enum EFI_PCI_PCIX_BUS_ERROR_MASTER_DATA_PARITY = 0x0005; 912 enum EFI_PCI_PCIX_BUS_ERROR_ADDRESS_PARITY = 0x0006; 913 enum EFI_PCI_PCIX_BUS_ERROR_COMMAND_PARITY = 0x0007; 914 ///@} 915 /// PCI/PCI-X Bus Error Section 916 struct EFI_PCI_PCIX_BUS_ERROR_DATA 917 { 918 align(1): 919 UINT64 ValidFields; 920 EFI_GENERIC_ERROR_STATUS ErrorStatus; 921 UINT16 Type; 922 UINT16 BusId; 923 UINT32 Resv2; 924 UINT64 BusAddress; 925 UINT64 BusData; 926 UINT64 BusCommand; 927 UINT64 RequestorId; 928 UINT64 ResponderId; 929 UINT64 TargetId; 930 } 931 /// Validation bits Indicates which of the following fields is valid 932 /// in PCI/PCI-X Component Error Section. 933 ///@{ 934 enum EFI_PCI_PCIX_DEVICE_ERROR_STATUS_VALID = BIT0; 935 enum EFI_PCI_PCIX_DEVICE_ERROR_ID_INFO_VALID = BIT1; 936 enum EFI_PCI_PCIX_DEVICE_ERROR_MEM_NUM_VALID = BIT2; 937 enum EFI_PCI_PCIX_DEVICE_ERROR_IO_NUM_VALID = BIT3; 938 enum EFI_PCI_PCIX_DEVICE_ERROR_REG_DATA_PAIR_VALID = BIT4; 939 ///@} 940 /// PCI/PCI-X Device Identification Information 941 struct EFI_GENERIC_ERROR_PCI_DEVICE_ID 942 { 943 align(1): 944 UINT16 VendorId; 945 UINT16 DeviceId; 946 UINT8[3] ClassCode; 947 UINT8 Function; 948 UINT8 Device; 949 UINT8 Bus; 950 UINT8 Segment; 951 UINT8 Resv1; 952 UINT32 Resv2; 953 } 954 /// Identifies the type of firmware error record 955 enum EFI_FIRMWARE_ERROR_TYPE_IPF_SAL = 0x00; 956 /// Firmware Error Record Section 957 struct EFI_FIRMWARE_ERROR_DATA 958 { 959 align(1): 960 UINT8 ErrorType; 961 UINT8[7] Resv1; 962 UINT64 RecordId; 963 } 964 /// Fault Reason in DMAr Generic Error Section 965 ///@{ 966 enum EFI_DMA_FAULT_REASON_TABLE_ENTRY_NOT_PRESENT = 0x01; 967 enum EFI_DMA_FAULT_REASON_TABLE_ENTRY_INVALID = 0x02; 968 enum EFI_DMA_FAULT_REASON_ACCESS_MAPPING_TABLE_ERROR = 0x03; 969 enum EFI_DMA_FAULT_REASON_RESV_BIT_ERROR_IN_MAPPING_TABLE = 0x04; 970 enum EFI_DMA_FAULT_REASON_ACCESS_ADDR_OUT_OF_SPACE = 0x05; 971 enum EFI_DMA_FAULT_REASON_INVALID_ACCESS = 0x06; 972 enum EFI_DMA_FAULT_REASON_INVALID_REQUEST = 0x07; 973 enum EFI_DMA_FAULT_REASON_ACCESS_TRANSLATE_TABLE_ERROR = 0x08; 974 enum EFI_DMA_FAULT_REASON_RESV_BIT_ERROR_IN_TRANSLATE_TABLE = 0x09; 975 enum EFI_DMA_FAULT_REASON_INVALID_COMMAOND = 0x0A; 976 enum EFI_DMA_FAULT_REASON_ACCESS_COMMAND_BUFFER_ERROR = 0x0B; 977 ///@} 978 /// DMA access type in DMAr Generic Error Section 979 ///@{ 980 enum EFI_DMA_ACCESS_TYPE_READ = 0x00; 981 enum EFI_DMA_ACCESS_TYPE_WRITE = 0x01; 982 ///@} 983 /// DMA address type in DMAr Generic Error Section 984 ///@{ 985 enum EFI_DMA_ADDRESS_UNTRANSLATED = 0x00; 986 enum EFI_DMA_ADDRESS_TRANSLATION = 0x01; 987 ///@} 988 /// Architecture type in DMAr Generic Error Section 989 ///@{ 990 enum EFI_DMA_ARCH_TYPE_VT = 0x01; 991 enum EFI_DMA_ARCH_TYPE_IOMMU = 0x02; 992 ///@} 993 /// DMAr Generic Error Section 994 struct EFI_DMAR_GENERIC_ERROR_DATA 995 { 996 align(1): 997 UINT16 RequesterId; 998 UINT16 SegmentNumber; 999 UINT8 FaultReason; 1000 UINT8 AccessType; 1001 UINT8 AddressType; 1002 UINT8 ArchType; 1003 UINT64 DeviceAddr; 1004 UINT8[16] Resv1; 1005 } 1006 /// Intel VT for Directed I/O specific DMAr Errors 1007 struct EFI_DIRECTED_IO_DMAR_ERROR_DATA 1008 { 1009 align(1): 1010 UINT8 Version; 1011 UINT8 Revision; 1012 UINT8[6] OemId; 1013 UINT64 Capability; 1014 UINT64 CapabilityEx; 1015 UINT32 GlobalCommand; 1016 UINT32 GlobalStatus; 1017 UINT32 FaultStatus; 1018 UINT8[12] Resv1; 1019 UINT64[2] FaultRecord; 1020 UINT64[2] RootEntry; 1021 UINT64[2] ContextEntry; 1022 UINT64 PteL6; 1023 UINT64 PteL5; 1024 UINT64 PteL4; 1025 UINT64 PteL3; 1026 UINT64 PteL2; 1027 UINT64 PteL1; 1028 } 1029 /// IOMMU specific DMAr Errors 1030 struct EFI_IOMMU_DMAR_ERROR_DATA 1031 { 1032 align(1): 1033 UINT8 Revision; 1034 UINT8[7] Resv1; 1035 UINT64 Control; 1036 UINT64 Status; 1037 UINT8[8] Resv2; 1038 UINT64[2] EventLogEntry; 1039 UINT8[16] Resv3; 1040 UINT64[4] DeviceTableEntry; 1041 UINT64 PteL6; 1042 UINT64 PteL5; 1043 UINT64 PteL4; 1044 UINT64 PteL3; 1045 UINT64 PteL2; 1046 UINT64 PteL1; 1047 } 1048 /// IA32 and x64 Specific definitions. 1049 /// EFI_DEBUG_IMAGE_INFO_TABLE configuration table GUID declaration. 1050 enum EFI_GUID EFI_DEBUG_IMAGE_INFO_TABLE_GUID = EFI_GUID(0x49152e77, 0x1ada, 1051 0x4764, [0xb7, 0xa2, 0x7a, 0xfe, 0xfe, 0xd9, 0x5e, 0x8b]); 1052 enum EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS = 0x01; 1053 enum EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED = 0x02; 1054 enum EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL = 0x01; 1055 struct EFI_SYSTEM_TABLE_POINTER 1056 { 1057 UINT64 Signature; ///< A constant UINT64 that has the value EFI_SYSTEM_TABLE_SIGNATURE 1058 EFI_PHYSICAL_ADDRESS EfiSystemTableBase; ///< The physical address of the EFI system table. 1059 UINT32 Crc32; ///< A 32-bit CRC value that is used to verify the EFI_SYSTEM_TABLE_POINTER structure is valid. 1060 } 1061 1062 struct EFI_DEBUG_IMAGE_INFO_NORMAL 1063 { 1064 /// 1065 /// Indicates the type of image info structure. For PE32 EFI images, 1066 /// this is set to EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL. 1067 /// 1068 UINT32 ImageInfoType; 1069 /// 1070 /// A pointer to an instance of the loaded image protocol for the associated image. 1071 /// 1072 EFI_LOADED_IMAGE_PROTOCOL* LoadedImageProtocolInstance; 1073 /// 1074 /// Indicates the image handle of the associated image. 1075 /// 1076 EFI_HANDLE ImageHandle; 1077 } 1078 1079 union EFI_DEBUG_IMAGE_INFO 1080 { 1081 UINT32* ImageInfoType; 1082 EFI_DEBUG_IMAGE_INFO_NORMAL* NormalImage; 1083 } 1084 1085 struct EFI_DEBUG_IMAGE_INFO_TABLE_HEADER 1086 { 1087 /// 1088 /// UpdateStatus is used by the system to indicate the state of the debug image info table. 1089 /// 1090 UINT32 UpdateStatus; 1091 /// 1092 /// The number of EFI_DEBUG_IMAGE_INFO elements in the array pointed to by EfiDebugImageInfoTable. 1093 /// 1094 UINT32 TableSize; 1095 /// 1096 /// A pointer to the first element of an array of EFI_DEBUG_IMAGE_INFO structures. 1097 /// 1098 EFI_DEBUG_IMAGE_INFO* EfiDebugImageInfoTable; 1099 } 1100 1101 enum EFI_GUID DXE_SERVICES_TABLE_GUID = EFI_GUID(0x5ad34ba, 0x6f02, 0x4214, 1102 [0x95, 0x2e, 0x4d, 0xa0, 0x39, 0x8e, 0x2b, 0xb9]); 1103 enum EFI_GUID EFI_EVENT_GROUP_EXIT_BOOT_SERVICES = EFI_GUID(0x27abf055, 0xb1b8, 1104 0x4c26, [0x80, 0x48, 0x74, 0x8f, 0x37, 0xba, 0xa2, 0xdf]); 1105 enum EFI_GUID EFI_EVENT_GROUP_VIRTUAL_ADDRESS_CHANGE = EFI_GUID(0x13fa7698, 1106 0xc831, 0x49c7, [0x87, 0xea, 0x8f, 0x43, 0xfc, 0xc2, 0x51, 0x96]); 1107 enum EFI_GUID EFI_EVENT_GROUP_MEMORY_MAP_CHANGE = EFI_GUID(0x78bee926, 0x692f, 1108 0x48fd, [0x9e, 0xdb, 0x1, 0x42, 0x2e, 0xf0, 0xd7, 0xab]); 1109 enum EFI_GUID EFI_EVENT_GROUP_READY_TO_BOOT = EFI_GUID(0x7ce88fb3, 0x4bd7, 1110 0x4679, [0x87, 0xa8, 0xa8, 0xd8, 0xde, 0xe5, 0x0d, 0x2b]); 1111 enum EFI_GUID EFI_EVENT_GROUP_DXE_DISPATCH_GUID = EFI_GUID(0x7081e22f, 0xcac6, 1112 0x4053, [0x94, 0x68, 0x67, 0x57, 0x82, 0xcf, 0x88, 0xe5]); 1113 enum EFI_GUID EFI_END_OF_DXE_EVENT_GROUP_GUID = EFI_GUID(0x2ce967a, 0xdd7e, 1114 0x4ffc, [0x9e, 0xe7, 0x81, 0xc, 0xf0, 0x47, 0x8, 0x80]); 1115 enum EFI_GUID EFI_EVENT_LEGACY_BOOT_GUID = EFI_GUID(0x2a571201, 0x4966, 0x47f6, 1116 [0x8b, 0x86, 0xf3, 0x1e, 0x41, 0xf3, 0x2f, 0x10]); 1117 enum EFI_GUID EFI_FILE_INFO_ID = EFI_GUID(0x9576e92, 0x6d3f, 0x11d2, [0x8e, 1118 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b]); 1119 struct EFI_FILE_INFO 1120 { 1121 /// 1122 /// The size of the EFI_FILE_INFO structure, including the Null-terminated FileName string. 1123 /// 1124 UINT64 Size; 1125 /// 1126 /// The size of the file in bytes. 1127 /// 1128 UINT64 FileSize; 1129 /// 1130 /// PhysicalSize The amount of physical space the file consumes on the file system volume. 1131 /// 1132 UINT64 PhysicalSize; 1133 /// 1134 /// The time the file was created. 1135 /// 1136 EFI_TIME CreateTime; 1137 /// 1138 /// The time when the file was last accessed. 1139 /// 1140 EFI_TIME LastAccessTime; 1141 /// 1142 /// The time when the file's contents were last modified. 1143 /// 1144 EFI_TIME ModificationTime; 1145 /// 1146 /// The attribute bits for the file. 1147 /// 1148 UINT64 Attribute; 1149 /// 1150 /// The Null-terminated name of the file. 1151 /// 1152 CHAR16[1] FileName; 1153 } 1154 1155 enum EFI_GUID EFI_FILE_SYSTEM_INFO_ID = EFI_GUID(0x9576e93, 0x6d3f, 0x11d2, 1156 [0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b]); 1157 struct EFI_FILE_SYSTEM_INFO 1158 { 1159 /// 1160 /// The size of the EFI_FILE_SYSTEM_INFO structure, including the Null-terminated VolumeLabel string. 1161 /// 1162 UINT64 Size; 1163 /// 1164 /// TRUE if the volume only supports read access. 1165 /// 1166 BOOLEAN ReadOnly; 1167 /// 1168 /// The number of bytes managed by the file system. 1169 /// 1170 UINT64 VolumeSize; 1171 /// 1172 /// The number of available bytes for use by the file system. 1173 /// 1174 UINT64 FreeSpace; 1175 /// 1176 /// The nominal block size by which files are typically grown. 1177 /// 1178 UINT32 BlockSize; 1179 /// 1180 /// The Null-terminated string that is the volume's label. 1181 /// 1182 CHAR16[1] VolumeLabel; 1183 } 1184 1185 enum EFI_GUID EFI_FILE_SYSTEM_VOLUME_LABEL_ID = EFI_GUID(0xDB47D7D3, 0xFE81, 1186 0x11d3, [0x9A, 0x35, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D]); 1187 struct EFI_FILE_SYSTEM_VOLUME_LABEL 1188 { 1189 /// 1190 /// The Null-terminated string that is the volume's label. 1191 /// 1192 CHAR16[1] VolumeLabel; 1193 } 1194 1195 enum EFI_GUID EFI_FIRMWARE_CONTENTS_SIGNED_GUID = EFI_GUID(0xf9d89e8, 0x9259, 1196 0x4f76, [0xa5, 0xaf, 0xc, 0x89, 0xe3, 0x40, 0x23, 0xdf]); 1197 /// The firmware volume header contains a data field for 1198 /// the file system GUID 1199 enum EFI_GUID EFI_FIRMWARE_FILE_SYSTEM2_GUID = EFI_GUID(0x8c8ce578, 0x8a3d, 1200 0x4f1c, [0x99, 0x35, 0x89, 0x61, 0x85, 0xc3, 0x2d, 0xd3]); 1201 /// A Volume Top File (VTF) is a file that must be 1202 /// located such that the last byte of the file is 1203 /// also the last byte of the firmware volume 1204 enum EFI_GUID EFI_FFS_VOLUME_TOP_FILE_GUID = EFI_GUID(0x1BA0062E, 0xC779, 1205 0x4582, [0x85, 0x66, 0x33, 0x6A, 0xE8, 0xF7, 0x8F, 0x9]); 1206 /// The firmware volume header contains a data field for the file system GUID 1207 /// {5473C07A-3DCB-4dca-BD6F-1E9689E7349A} 1208 enum EFI_GUID EFI_FIRMWARE_FILE_SYSTEM3_GUID = EFI_GUID(0x5473c07a, 0x3dcb, 1209 0x4dca, [0xbd, 0x6f, 0x1e, 0x96, 0x89, 0xe7, 0x34, 0x9a]); 1210 1211 enum EFI_GUID EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID = EFI_GUID(0x6dcbd5ed, 1212 0xe82d, 0x4c44, [0xbd, 0xa1, 0x71, 0x94, 0x19, 0x9a, 0xd9, 0x2a]); 1213 struct EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER 1214 { 1215 align(1): 1216 UINT32 Version; 1217 /// 1218 /// The number of drivers included in the capsule and the number of corresponding 1219 /// offsets stored in ItemOffsetList array. 1220 /// 1221 UINT16 EmbeddedDriverCount; 1222 /// 1223 /// The number of payload items included in the capsule and the number of 1224 /// corresponding offsets stored in the ItemOffsetList array. 1225 /// 1226 UINT16 PayloadItemCount; 1227 /// 1228 /// Variable length array of dimension [EmbeddedDriverCount + PayloadItemCount] 1229 /// containing offsets of each of the drivers and payload items contained within the capsule 1230 /// 1231 // UINT64 ItemOffsetList[]; 1232 } 1233 1234 struct EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER 1235 { 1236 align(1): 1237 UINT32 Version; 1238 /// 1239 /// Used to identify device firmware targeted by this update. This guid is matched by 1240 /// system firmware against ImageTypeId field within a EFI_FIRMWARE_IMAGE_DESCRIPTOR 1241 /// 1242 EFI_GUID UpdateImageTypeId; 1243 /// 1244 /// Passed as ImageIndex in call to EFI_FIRMWARE_MANAGEMENT_PROTOCOL.SetImage() 1245 /// 1246 UINT8 UpdateImageIndex; 1247 UINT8[3] reserved_bytes; 1248 /// 1249 /// Size of the binary update image which immediately follows this structure 1250 /// 1251 UINT32 UpdateImageSize; 1252 /// 1253 /// Size of the VendorCode bytes which optionally immediately follow binary update image in the capsule 1254 /// 1255 UINT32 UpdateVendorCodeSize; 1256 /// 1257 /// The HardwareInstance to target with this update. If value is zero it means match all 1258 /// HardwareInstances. This field allows update software to target only a single device in 1259 /// cases where there are more than one device with the same ImageTypeId GUID. 1260 /// This header is outside the signed data of the Authentication Info structure and 1261 /// therefore can be modified without changing the Auth data. 1262 /// 1263 UINT64 UpdateHardwareInstance; 1264 } 1265 1266 enum EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION = 0x00000001; 1267 enum EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION = 0x00000002; 1268 enum EFI_GUID EFI_GLOBAL_VARIABLE = EFI_GUID(0x8BE4DF61, 0x93CA, 0x11d2, [0xAA, 1269 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C]); 1270 /// The language codes that the firmware supports. This value is deprecated. 1271 /// Its attribute is BS+RT. 1272 enum EFI_LANG_CODES_VARIABLE_NAME = "LangCodes"w; 1273 /// The language code that the system is configured for. This value is deprecated. 1274 /// Its attribute is NV+BS+RT. 1275 enum EFI_LANG_VARIABLE_NAME = "Lang"w; 1276 /// The firmware's boot managers timeout, in seconds, before initiating the default boot selection. 1277 /// Its attribute is NV+BS+RT. 1278 enum EFI_TIME_OUT_VARIABLE_NAME = "Timeout"w; 1279 /// The language codes that the firmware supports. 1280 /// Its attribute is BS+RT. 1281 enum EFI_PLATFORM_LANG_CODES_VARIABLE_NAME = "PlatformLangCodes"w; 1282 /// The language code that the system is configured for. 1283 /// Its attribute is NV+BS+RT. 1284 enum EFI_PLATFORM_LANG_VARIABLE_NAME = "PlatformLang"w; 1285 /// The device path of the default input/output/error output console. 1286 /// Its attribute is NV+BS+RT. 1287 enum EFI_CON_IN_VARIABLE_NAME = "ConIn"w; 1288 enum EFI_CON_OUT_VARIABLE_NAME = "ConOut"w; 1289 enum EFI_ERR_OUT_VARIABLE_NAME = "ErrOut"w; 1290 /// The device path of all possible input/output/error output devices. 1291 /// Its attribute is BS+RT. 1292 enum EFI_CON_IN_DEV_VARIABLE_NAME = "ConInDev"w; 1293 enum EFI_CON_OUT_DEV_VARIABLE_NAME = "ConOutDev"w; 1294 enum EFI_ERR_OUT_DEV_VARIABLE_NAME = "ErrOutDev"w; 1295 /// The ordered boot option load list. 1296 /// Its attribute is NV+BS+RT. 1297 enum EFI_BOOT_ORDER_VARIABLE_NAME = "BootOrder"w; 1298 /// The boot option for the next boot only. 1299 /// Its attribute is NV+BS+RT. 1300 enum EFI_BOOT_NEXT_VARIABLE_NAME = "BootNext"w; 1301 /// The boot option that was selected for the current boot. 1302 /// Its attribute is BS+RT. 1303 enum EFI_BOOT_CURRENT_VARIABLE_NAME = "BootCurrent"w; 1304 /// The types of boot options supported by the boot manager. Should be treated as read-only. 1305 /// Its attribute is BS+RT. 1306 enum EFI_BOOT_OPTION_SUPPORT_VARIABLE_NAME = "BootOptionSupport"w; 1307 /// The ordered driver load option list. 1308 /// Its attribute is NV+BS+RT. 1309 enum EFI_DRIVER_ORDER_VARIABLE_NAME = "DriverOrder"w; 1310 /// The ordered System Prep Application load option list. 1311 /// Its attribute is NV+BS+RT. 1312 enum EFI_SYS_PREP_ORDER_VARIABLE_NAME = "SysPrepOrder"w; 1313 /// Identifies the level of hardware error record persistence 1314 /// support implemented by the platform. This variable is 1315 /// only modified by firmware and is read-only to the OS. 1316 /// Its attribute is NV+BS+RT. 1317 enum EFI_HW_ERR_REC_SUPPORT_VARIABLE_NAME = "HwErrRecSupport"w; 1318 /// Whether the system is operating in setup mode (1) or not (0). 1319 /// All other values are reserved. Should be treated as read-only. 1320 /// Its attribute is BS+RT. 1321 enum EFI_SETUP_MODE_NAME = "SetupMode"w; 1322 /// The Key Exchange Key Signature Database. 1323 /// Its attribute is NV+BS+RT+AT. 1324 enum EFI_KEY_EXCHANGE_KEY_NAME = "KEK"w; 1325 /// The public Platform Key. 1326 /// Its attribute is NV+BS+RT+AT. 1327 enum EFI_PLATFORM_KEY_NAME = "PK"w; 1328 /// Array of GUIDs representing the type of signatures supported 1329 /// by the platform firmware. Should be treated as read-only. 1330 /// Its attribute is BS+RT. 1331 enum EFI_SIGNATURE_SUPPORT_NAME = "SignatureSupport"w; 1332 /// Whether the platform firmware is operating in Secure boot mode (1) or not (0). 1333 /// All other values are reserved. Should be treated as read-only. 1334 /// Its attribute is BS+RT. 1335 enum EFI_SECURE_BOOT_MODE_NAME = "SecureBoot"w; 1336 /// The OEM's default Key Exchange Key Signature Database. Should be treated as read-only. 1337 /// Its attribute is BS+RT. 1338 enum EFI_KEK_DEFAULT_VARIABLE_NAME = "KEKDefault"w; 1339 /// The OEM's default public Platform Key. Should be treated as read-only. 1340 /// Its attribute is BS+RT. 1341 enum EFI_PK_DEFAULT_VARIABLE_NAME = "PKDefault"w; 1342 /// The OEM's default secure boot signature store. Should be treated as read-only. 1343 /// Its attribute is BS+RT. 1344 enum EFI_DB_DEFAULT_VARIABLE_NAME = "dbDefault"w; 1345 /// The OEM's default secure boot blacklist signature store. Should be treated as read-only. 1346 /// Its attribute is BS+RT. 1347 enum EFI_DBX_DEFAULT_VARIABLE_NAME = "dbxDefault"w; 1348 /// The OEM's default secure boot timestamp signature store. Should be treated as read-only. 1349 /// Its attribute is BS+RT. 1350 enum EFI_DBT_DEFAULT_VARIABLE_NAME = "dbtDefault"w; 1351 /// Allows the firmware to indicate supported features and actions to the OS. 1352 /// Its attribute is BS+RT. 1353 enum EFI_OS_INDICATIONS_SUPPORT_VARIABLE_NAME = "OsIndicationsSupported"w; 1354 /// Allows the OS to request the firmware to enable certain features and to take certain actions. 1355 /// Its attribute is NV+BS+RT. 1356 enum EFI_OS_INDICATIONS_VARIABLE_NAME = "OsIndications"w; 1357 /// Whether the system is configured to use only vendor provided 1358 /// keys or not. Should be treated as read-only. 1359 /// Its attribute is BS+RT. 1360 enum EFI_VENDOR_KEYS_VARIABLE_NAME = "VendorKeys"w; 1361 enum EFI_GUID EFI_PART_TYPE_UNUSED_GUID = EFI_GUID(0x00000000, 0x0000, 0x0000, 1362 [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]); 1363 enum EFI_GUID EFI_PART_TYPE_EFI_SYSTEM_PART_GUID = EFI_GUID(0xc12a7328, 0xf81f, 1364 0x11d2, [0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b]); 1365 enum EFI_GUID EFI_PART_TYPE_LEGACY_MBR_GUID = EFI_GUID(0x024dee41, 0x33e7, 1366 0x11d3, [0x9d, 0x69, 0x00, 0x08, 0xc7, 0x81, 0xf3, 0x9f]); 1367 enum EFI_GUID EFI_PEI_GRAPHICS_INFO_HOB_GUID = EFI_GUID(0x39f62cce, 0x6825, 1368 0x4669, [0xbb, 0x56, 0x54, 0x1a, 0xba, 0x75, 0x3a, 0x07]); 1369 struct EFI_PEI_GRAPHICS_INFO_HOB 1370 { 1371 EFI_PHYSICAL_ADDRESS FrameBufferBase; 1372 UINT32 FrameBufferSize; 1373 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION GraphicsMode; 1374 } 1375 1376 enum EFI_GUID EFI_HARDWARE_ERROR_VARIABLE = EFI_GUID(0x414E6BDD, 0xE47B, 1377 0x47cc, [0xB2, 0x44, 0xBB, 0x61, 0x02, 0x0C, 0xF5, 0x16]); 1378 enum EFI_GUID EFI_HII_STANDARD_FORM_GUID = EFI_GUID(0x3bd2f4ec, 0xe524, 0x46e4, 1379 [0xa9, 0xd8, 0x51, 0x1, 0x17, 0x42, 0x55, 0x62]); 1380 enum EFI_GUID EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID = EFI_GUID(0x14982a4f, 1381 0xb0ed, 0x45b8, [0xa8, 0x11, 0x5a, 0x7a, 0x9b, 0xc2, 0x32, 0xdf]); 1382 enum EFI_GUID EFI_HII_PLATFORM_SETUP_FORMSET_GUID = EFI_GUID(0x93039971, 1383 0x8545, 0x4b04, [0xb4, 0x5e, 0x32, 0xeb, 0x83, 0x26, 0x4, 0xe]); 1384 enum EFI_GUID EFI_HII_DRIVER_HEALTH_FORMSET_GUID = EFI_GUID(0xf22fc20c, 0x8cf4, 1385 0x45eb, [0x8e, 0x6, 0xad, 0x4e, 0x50, 0xb9, 0x5d, 0xd3]); 1386 enum EFI_GUID EFI_HII_USER_CREDENTIAL_FORMSET_GUID = EFI_GUID(0x337f4407, 1387 0x5aee, 0x4b83, [0xb2, 0xa7, 0x4e, 0xad, 0xca, 0x30, 0x88, 0xcd]); 1388 enum EFI_GUID HOB_LIST_GUID = EFI_GUID(0x7739f24c, 0x93d7, 0x11d4, [0x9a, 0x3a, 1389 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d]); 1390 enum EFI_GUID EFI_IMAGE_SECURITY_DATABASE_GUID = EFI_GUID(0xd719b2cb, 0x3d3a, 1391 0x4596, [0xa3, 0xbc, 0xda, 0xd0, 0xe, 0x67, 0x65, 0x6f]); 1392 /// Varialbe name with guid EFI_IMAGE_SECURITY_DATABASE_GUID 1393 /// for the authorized signature database. 1394 enum EFI_IMAGE_SECURITY_DATABASE = "db"w; 1395 /// Varialbe name with guid EFI_IMAGE_SECURITY_DATABASE_GUID 1396 /// for the forbidden signature database. 1397 enum EFI_IMAGE_SECURITY_DATABASE1 = "dbx"w; 1398 /// Variable name with guid EFI_IMAGE_SECURITY_DATABASE_GUID 1399 /// for the timestamp signature database. 1400 enum EFI_IMAGE_SECURITY_DATABASE2 = "dbt"w; 1401 enum SECURE_BOOT_MODE_ENABLE = 1; 1402 enum SECURE_BOOT_MODE_DISABLE = 0; 1403 enum SETUP_MODE = 1; 1404 enum USER_MODE = 0; 1405 /// The format of a signature database. 1406 struct EFI_SIGNATURE_DATA 1407 { 1408 align(1): 1409 /// 1410 /// An identifier which identifies the agent which added the signature to the list. 1411 /// 1412 EFI_GUID SignatureOwner; 1413 /// 1414 /// The format of the signature is defined by the SignatureType. 1415 /// 1416 UINT8[1] SignatureData; 1417 } 1418 1419 struct EFI_SIGNATURE_LIST 1420 { 1421 align(1): 1422 /// 1423 /// Type of the signature. GUID signature types are defined in below. 1424 /// 1425 EFI_GUID SignatureType; 1426 /// 1427 /// Total size of the signature list, including this header. 1428 /// 1429 UINT32 SignatureListSize; 1430 /// 1431 /// Size of the signature header which precedes the array of signatures. 1432 /// 1433 UINT32 SignatureHeaderSize; 1434 /// 1435 /// Size of each signature. 1436 /// 1437 UINT32 SignatureSize; 1438 /// 1439 /// Header before the array of signatures. The format of this header is specified 1440 /// by the SignatureType. 1441 /// UINT8 SignatureHeader[SignatureHeaderSize]; 1442 /// 1443 /// An array of signatures. Each signature is SignatureSize bytes in length. 1444 /// EFI_SIGNATURE_DATA Signatures[][SignatureSize]; 1445 /// 1446 } 1447 1448 struct EFI_CERT_X509_SHA256 1449 { 1450 align(1): 1451 /// 1452 /// The SHA256 hash of an X.509 certificate's To-Be-Signed contents. 1453 /// 1454 EFI_SHA256_HASH ToBeSignedHash; 1455 /// 1456 /// The time that the certificate shall be considered to be revoked. 1457 /// 1458 EFI_TIME TimeOfRevocation; 1459 } 1460 1461 struct EFI_CERT_X509_SHA384 1462 { 1463 align(1): 1464 /// 1465 /// The SHA384 hash of an X.509 certificate's To-Be-Signed contents. 1466 /// 1467 EFI_SHA384_HASH ToBeSignedHash; 1468 /// 1469 /// The time that the certificate shall be considered to be revoked. 1470 /// 1471 EFI_TIME TimeOfRevocation; 1472 } 1473 1474 struct EFI_CERT_X509_SHA512 1475 { 1476 align(1): 1477 /// 1478 /// The SHA512 hash of an X.509 certificate's To-Be-Signed contents. 1479 /// 1480 EFI_SHA512_HASH ToBeSignedHash; 1481 /// 1482 /// The time that the certificate shall be considered to be revoked. 1483 /// 1484 EFI_TIME TimeOfRevocation; 1485 } 1486 /// This identifies a signature containing a SHA-256 hash. The SignatureHeader size shall 1487 /// always be 0. The SignatureSize shall always be 16 (size of SignatureOwner component) + 1488 /// 32 bytes. 1489 enum EFI_GUID EFI_CERT_SHA256_GUID = EFI_GUID(0xc1c41626, 0x504c, 0x4092, 1490 [0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28]); 1491 /// This identifies a signature containing an RSA-2048 key. The key (only the modulus 1492 /// since the public key exponent is known to be 0x10001) shall be stored in big-endian 1493 /// order. 1494 /// The SignatureHeader size shall always be 0. The SignatureSize shall always be 16 (size 1495 /// of SignatureOwner component) + 256 bytes. 1496 enum EFI_GUID EFI_CERT_RSA2048_GUID = EFI_GUID(0x3c5766e8, 0x269c, 0x4e34, 1497 [0xaa, 0x14, 0xed, 0x77, 0x6e, 0x85, 0xb3, 0xb6]); 1498 /// This identifies a signature containing a RSA-2048 signature of a SHA-256 hash. The 1499 /// SignatureHeader size shall always be 0. The SignatureSize shall always be 16 (size of 1500 /// SignatureOwner component) + 256 bytes. 1501 enum EFI_GUID EFI_CERT_RSA2048_SHA256_GUID = EFI_GUID(0xe2b36190, 0x879b, 1502 0x4a3d, [0xad, 0x8d, 0xf2, 0xe7, 0xbb, 0xa3, 0x27, 0x84]); 1503 /// This identifies a signature containing a SHA-1 hash. The SignatureSize shall always 1504 /// be 16 (size of SignatureOwner component) + 20 bytes. 1505 enum EFI_GUID EFI_CERT_SHA1_GUID = EFI_GUID(0x826ca512, 0xcf10, 0x4ac9, [0xb1, 1506 0x87, 0xbe, 0x1, 0x49, 0x66, 0x31, 0xbd]); 1507 /// TThis identifies a signature containing a RSA-2048 signature of a SHA-1 hash. The 1508 /// SignatureHeader size shall always be 0. The SignatureSize shall always be 16 (size of 1509 /// SignatureOwner component) + 256 bytes. 1510 enum EFI_GUID EFI_CERT_RSA2048_SHA1_GUID = EFI_GUID(0x67f8444f, 0x8743, 0x48f1, 1511 [0xa3, 0x28, 0x1e, 0xaa, 0xb8, 0x73, 0x60, 0x80]); 1512 /// This identifies a signature based on an X.509 certificate. If the signature is an X.509 1513 /// certificate then verification of the signature of an image should validate the public 1514 /// key certificate in the image using certificate path verification, up to this X.509 1515 /// certificate as a trusted root. The SignatureHeader size shall always be 0. The 1516 /// SignatureSize may vary but shall always be 16 (size of the SignatureOwner component) + 1517 /// the size of the certificate itself. 1518 /// Note: This means that each certificate will normally be in a separate EFI_SIGNATURE_LIST. 1519 enum EFI_GUID EFI_CERT_X509_GUID = EFI_GUID(0xa5c059a1, 0x94e4, 0x4aa7, [0x87, 1520 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72]); 1521 /// This identifies a signature containing a SHA-224 hash. The SignatureHeader size shall 1522 /// always be 0. The SignatureSize shall always be 16 (size of SignatureOwner component) + 1523 /// 28 bytes. 1524 enum EFI_GUID EFI_CERT_SHA224_GUID = EFI_GUID(0xb6e5233, 0xa65c, 0x44c9, [0x94, 1525 0x7, 0xd9, 0xab, 0x83, 0xbf, 0xc8, 0xbd]); 1526 /// This identifies a signature containing a SHA-384 hash. The SignatureHeader size shall 1527 /// always be 0. The SignatureSize shall always be 16 (size of SignatureOwner component) + 1528 /// 48 bytes. 1529 enum EFI_GUID EFI_CERT_SHA384_GUID = EFI_GUID(0xff3e5307, 0x9fd0, 0x48c9, 1530 [0x85, 0xf1, 0x8a, 0xd5, 0x6c, 0x70, 0x1e, 0x1]); 1531 /// This identifies a signature containing a SHA-512 hash. The SignatureHeader size shall 1532 /// always be 0. The SignatureSize shall always be 16 (size of SignatureOwner component) + 1533 /// 64 bytes. 1534 enum EFI_GUID EFI_CERT_SHA512_GUID = EFI_GUID(0x93e0fae, 0xa6c4, 0x4f50, [0x9f, 1535 0x1b, 0xd4, 0x1e, 0x2b, 0x89, 0xc1, 0x9a]); 1536 /// This identifies a signature containing the SHA256 hash of an X.509 certificate's 1537 /// To-Be-Signed contents, and a time of revocation. The SignatureHeader size shall 1538 /// always be 0. The SignatureSize shall always be 16 (size of the SignatureOwner component) 1539 /// + 48 bytes for an EFI_CERT_X509_SHA256 structure. If the TimeOfRevocation is non-zero, 1540 /// the certificate should be considered to be revoked from that time and onwards, and 1541 /// otherwise the certificate shall be considered to always be revoked. 1542 enum EFI_GUID EFI_CERT_X509_SHA256_GUID = EFI_GUID(0x3bd2a492, 0x96c0, 0x4079, 1543 [0xb4, 0x20, 0xfc, 0xf9, 0x8e, 0xf1, 0x03, 0xed]); 1544 /// This identifies a signature containing the SHA384 hash of an X.509 certificate's 1545 /// To-Be-Signed contents, and a time of revocation. The SignatureHeader size shall 1546 /// always be 0. The SignatureSize shall always be 16 (size of the SignatureOwner component) 1547 /// + 64 bytes for an EFI_CERT_X509_SHA384 structure. If the TimeOfRevocation is non-zero, 1548 /// the certificate should be considered to be revoked from that time and onwards, and 1549 /// otherwise the certificate shall be considered to always be revoked. 1550 enum EFI_GUID EFI_CERT_X509_SHA384_GUID = EFI_GUID(0x7076876e, 0x80c2, 0x4ee6, 1551 [0xaa, 0xd2, 0x28, 0xb3, 0x49, 0xa6, 0x86, 0x5b]); 1552 /// This identifies a signature containing the SHA512 hash of an X.509 certificate's 1553 /// To-Be-Signed contents, and a time of revocation. The SignatureHeader size shall 1554 /// always be 0. The SignatureSize shall always be 16 (size of the SignatureOwner component) 1555 /// + 80 bytes for an EFI_CERT_X509_SHA512 structure. If the TimeOfRevocation is non-zero, 1556 /// the certificate should be considered to be revoked from that time and onwards, and 1557 /// otherwise the certificate shall be considered to always be revoked. 1558 enum EFI_GUID EFI_CERT_X509_SHA512_GUID = EFI_GUID(0x446dbf63, 0x2502, 0x4cda, 1559 [0xbc, 0xfa, 0x24, 0x65, 0xd2, 0xb0, 0xfe, 0x9d]); 1560 /// This identifies a signature containing a DER-encoded PKCS #7 version 1.5 [RFC2315] 1561 /// SignedData value. 1562 enum EFI_GUID EFI_CERT_TYPE_PKCS7_GUID = EFI_GUID(0x4aafd29d, 0x68df, 0x49ee, 1563 [0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7]); 1564 alias EFI_IMAGE_EXECUTION_ACTION = UINT32; 1565 enum EFI_IMAGE_EXECUTION_AUTHENTICATION = 0x00000007; 1566 enum EFI_IMAGE_EXECUTION_AUTH_UNTESTED = 0x00000000; 1567 enum EFI_IMAGE_EXECUTION_AUTH_SIG_FAILED = 0x00000001; 1568 enum EFI_IMAGE_EXECUTION_AUTH_SIG_PASSED = 0x00000002; 1569 enum EFI_IMAGE_EXECUTION_AUTH_SIG_NOT_FOUND = 0x00000003; 1570 enum EFI_IMAGE_EXECUTION_AUTH_SIG_FOUND = 0x00000004; 1571 enum EFI_IMAGE_EXECUTION_POLICY_FAILED = 0x00000005; 1572 enum EFI_IMAGE_EXECUTION_INITIALIZED = 0x00000008; 1573 struct EFI_IMAGE_EXECUTION_INFO 1574 { 1575 /// 1576 /// Describes the action taken by the firmware regarding this image. 1577 /// 1578 EFI_IMAGE_EXECUTION_ACTION Action; 1579 /// 1580 /// Size of all of the entire structure. 1581 /// 1582 UINT32 InfoSize; 1583 /// 1584 /// If this image was a UEFI device driver (for option ROM, for example) this is the 1585 /// null-terminated, user-friendly name for the device. If the image was for an application, 1586 /// then this is the name of the application. If this cannot be determined, then a simple 1587 /// NULL character should be put in this position. 1588 /// CHAR16 Name[]; 1589 /// 1590 /// 1591 /// For device drivers, this is the device path of the device for which this device driver 1592 /// was intended. In some cases, the driver itself may be stored as part of the system 1593 /// firmware, but this field should record the device's path, not the firmware path. For 1594 /// applications, this is the device path of the application. If this cannot be determined, 1595 /// a simple end-of-path device node should be put in this position. 1596 /// EFI_DEVICE_PATH_PROTOCOL DevicePath; 1597 /// 1598 /// 1599 /// Zero or more image signatures. If the image contained no signatures, 1600 /// then this field is empty. 1601 /// EFI_SIGNATURE_LIST Signature; 1602 /// 1603 } 1604 1605 struct EFI_IMAGE_EXECUTION_INFO_TABLE 1606 { 1607 /// 1608 /// Number of EFI_IMAGE_EXECUTION_INFO structures. 1609 /// 1610 UINTN NumberOfImages; 1611 /// 1612 /// Number of image instances of EFI_IMAGE_EXECUTION_INFO structures. 1613 /// 1614 // EFI_IMAGE_EXECUTION_INFO InformationInfo[] 1615 } 1616 1617 enum EFI_GUID MDEPKG_TOKEN_SPACE_GUID = EFI_GUID(0x914AEBE7, 0x4635, 0x459b, 1618 [0xAA, 0x1C, 0x11, 0xE2, 0x19, 0xB0, 0x3A, 0x10]); 1619 enum EFI_GUID EFI_HOB_MEMORY_ALLOC_BSP_STORE_GUID = EFI_GUID(0x564b33cd, 1620 0xc92a, 0x4593, [0x90, 0xbf, 0x24, 0x73, 0xe4, 0x3c, 0x63, 0x22]); 1621 enum EFI_GUID EFI_HOB_MEMORY_ALLOC_STACK_GUID = EFI_GUID(0x4ed4bf27, 0x4092, 1622 0x42e9, [0x80, 0x7d, 0x52, 0x7b, 0x1d, 0x0, 0xc9, 0xbd]); 1623 enum EFI_GUID EFI_HOB_MEMORY_ALLOC_MODULE_GUID = EFI_GUID(0xf8e21975, 0x899, 1624 0x4f58, [0xa4, 0xbe, 0x55, 0x25, 0xa9, 0xc6, 0xd7, 0x7a]); 1625 enum EFI_GUID MEMORY_ONLY_RESET_CONTROL_GUID = EFI_GUID(0xe20939be, 0x32d4, 1626 0x41be, [0xa1, 0x50, 0x89, 0x7f, 0x85, 0xd4, 0x98, 0x29]); 1627 /// Variable name is "MemoryOverwriteRequestControl" and it is a 1 byte unsigned value. 1628 /// The attributes should be: 1629 /// EFI_VARIABLE_NON_ | 1630 /// EFI_VARIABLE_BOOTSERVICE_ACCESS | 1631 /// EFI_VARIABLE_RUNTIME_ACCESS 1632 enum MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME = "MemoryOverwriteRequestControl"w; 1633 /// 0 = Firmware MUST clear the MOR bi 1634 /// 1 = Firmware MUST set the MOR bit 1635 enum MOR_CLEAR_MEMORY_BIT_MASK = 0x01; 1636 /// 0 = Firmware MAY autodetect a clean shutdown of the Static RTM OS. 1637 /// 1 = Firmware MUST NOT autodetect a clean shutdown of the Static RTM OS. 1638 enum MOR_DISABLEAUTODETECT_BIT_MASK = 0x10; 1639 /// MOR field bit offset 1640 enum MOR_CLEAR_MEMORY_BIT_OFFSET = 0; 1641 enum MOR_DISABLEAUTODETECT_BIT_OFFSET = 4; 1642 /** 1643 Return the ClearMemory bit value 0 or 1. 1644 1645 @param mor 1 byte value that contains ClearMemory and DisableAutoDetect bit. 1646 1647 @return ClearMemory bit value 1648 **/ 1649 // #define MOR_CLEAR_MEMORY_VALUE(mor) (((UINT8)(mor) & MOR_CLEAR_MEMORY_BIT_MASK) >> MOR_CLEAR_MEMORY_BIT_OFFSET) 1650 /** 1651 Return the DisableAutoDetect bit value 0 or 1. 1652 1653 @param mor 1 byte value that contains ClearMemory and DisableAutoDetect bit. 1654 1655 @return DisableAutoDetect bit value 1656 **/ 1657 // #define MOR_DISABLE_AUTO_DETECT_VALUE(mor) (((UINT8)(mor) & MOR_DISABLEAUTODETECT_BIT_MASK) >> MOR_DISABLEAUTODETECT_BIT_OFFSET) 1658 enum EFI_GUID EFI_MPS_TABLE_GUID = EFI_GUID(0xeb9d2d2f, 0x2d88, 0x11d3, [0x9a, 1659 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d]); 1660 enum MPS_TABLE_GUID = EFI_MPS_TABLE_GUID; 1661 enum EFI_GUID EFI_PC_ANSI_GUID = EFI_GUID(0xe0c14753, 0xf9be, 0x11d2, [0x9a, 1662 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d]); 1663 enum EFI_GUID EFI_VT_100_GUID = EFI_GUID(0xdfa66065, 0xb419, 0x11d3, [0x9a, 1664 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d]); 1665 enum EFI_GUID EFI_VT_100_PLUS_GUID = EFI_GUID(0x7baec70b, 0x57e0, 0x4c76, 1666 [0x8e, 0x87, 0x2f, 0x9e, 0x28, 0x08, 0x83, 0x43]); 1667 enum EFI_GUID EFI_VT_UTF8_GUID = EFI_GUID(0xad15a0d6, 0x8bec, 0x4acf, [0xa0, 1668 0x73, 0xd0, 0x1d, 0xe7, 0x7e, 0x2d, 0x88]); 1669 enum EFI_GUID DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL = EFI_GUID(0x37499a9d, 1670 0x542f, 0x4c89, [0xa0, 0x26, 0x35, 0xda, 0x14, 0x20, 0x94, 0xe4]); 1671 enum EFI_GUID EFI_SAS_DEVICE_PATH_GUID = EFI_GUID(0xd487ddb4, 0x008b, 0x11d9, 1672 [0xaf, 0xdc, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d]); 1673 1674 struct EFI_PROPERTIES_TABLE 1675 { 1676 UINT32 Version; 1677 UINT32 Length; 1678 UINT64 MemoryProtectionAttribute; 1679 } 1680 1681 enum EFI_PROPERTIES_TABLE_VERSION = 0x00010000; 1682 enum EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA = 0x1; 1683 enum EFI_GUID SAL_SYSTEM_TABLE_GUID = EFI_GUID(0xeb9d2d32, 0x2d88, 0x11d3, 1684 [0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d]); 1685 enum EFI_GUID SMBIOS_TABLE_GUID = EFI_GUID(0xeb9d2d31, 0x2d88, 0x11d3, [0x9a, 1686 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d]); 1687 enum EFI_GUID SMBIOS3_TABLE_GUID = EFI_GUID(0xf2fd1544, 0x9794, 0x4a2c, [0x99, 1688 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94]); 1689 /+ 1690 // FIXME: INCLUDE <PiDxe.h> 1691 // FIXME: INCLUDE <Protocol/DebugSupport.h> 1692 /// Global ID for the EFI_STATUS_CODE_STRING structure 1693 enum EFI_GUID EFI_STATUS_CODE_DATA_TYPE_STRING_GUID = EFI_GUID(0x92D11080, 1694 0x496F, 0x4D95, [0xBE, 0x7E, 0x03, 0x74, 0x88, 0x38, 0x2B, 0x0A]); 1695 alias EFI_STRING_TYPE = UINT32; 1696 enum : EFI_STRING_TYPE 1697 { 1698 /// 1699 /// A NULL-terminated ASCII string. 1700 /// 1701 EfiStringAscii, 1702 /// 1703 /// A double NULL-terminated Unicode string. 1704 /// 1705 EfiStringUnicode, 1706 /// 1707 /// An EFI_STATUS_CODE_STRING_TOKEN representing the string. The actual 1708 /// string can be obtained by querying the HII Database 1709 /// 1710 EfiStringToken 1711 } 1712 /// Specifies the format of the data in EFI_STATUS_CODE_STRING_DATA.String. 1713 struct EFI_STATUS_CODE_STRING_TOKEN 1714 { 1715 /// 1716 /// The HII package list which contains the string. Handle is a dynamic value that may 1717 /// not be the same for different boots. Type EFI_HII_HANDLE is defined in 1718 /// EFI_HII_DATABASE_PROTOCOL.NewPackageList() in the UEFI Specification. 1719 /// 1720 EFI_HII_HANDLE Handle; 1721 /// 1722 /// When combined with Handle, the string token can be used to retrieve the string. 1723 /// Type EFI_STRING_ID is defined in EFI_IFR_OP_HEADER in the UEFI Specification. 1724 /// 1725 EFI_STRING_ID Token; 1726 } 1727 1728 union EFI_STATUS_CODE_STRING 1729 { 1730 /// 1731 /// ASCII formatted string. 1732 /// 1733 CHAR8* Ascii; 1734 /// 1735 /// Unicode formatted string. 1736 /// 1737 CHAR16* Unicode; 1738 /// 1739 /// HII handle/token pair. 1740 /// 1741 EFI_STATUS_CODE_STRING_TOKEN Hii; 1742 } 1743 /// This data type defines a string type of extended data. A string can accompany 1744 /// any status code. The string can provide additional information about the 1745 /// status code. The string can be ASCII, Unicode, or a Human Interface Infrastructure 1746 /// (HII) token/GUID pair. 1747 struct EFI_STATUS_CODE_STRING_DATA 1748 { 1749 /// 1750 /// The data header identifying the data. DataHeader.HeaderSize should be 1751 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 1752 /// sizeof (EFI_STATUS_CODE_STRING_DATA) - HeaderSize, and 1753 /// DataHeader.Type should be 1754 /// EFI_STATUS_CODE_DATA_TYPE_STRING_GUID. 1755 /// 1756 EFI_STATUS_CODE_DATA DataHeader; 1757 /// 1758 /// Specifies the format of the data in String. 1759 /// 1760 EFI_STRING_TYPE StringType; 1761 /// 1762 /// A pointer to the extended data. The data follows the format specified by 1763 /// StringType. 1764 /// 1765 EFI_STATUS_CODE_STRING String; 1766 } 1767 /// Global ID for the following structures: 1768 /// - EFI_DEVICE_PATH_EXTENDED_DATA 1769 /// - EFI_DEVICE_HANDLE_EXTENDED_DATA 1770 /// - EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA 1771 /// - EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA 1772 /// - EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA 1773 /// - EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA 1774 /// - EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA 1775 /// - EFI_MEMORY_RANGE_EXTENDED_DATA 1776 /// - EFI_DEBUG_ASSERT_DATA 1777 /// - EFI_STATUS_CODE_EXCEP_EXTENDED_DATA 1778 /// - EFI_STATUS_CODE_START_EXTENDED_DATA 1779 /// - EFI_LEGACY_OPROM_EXTENDED_DATA 1780 enum EFI_GUID EFI_STATUS_CODE_SPECIFIC_DATA_GUID = EFI_GUID(0x335984bd, 0xe805, 1781 0x409a, [0xb8, 0xf8, 0xd2, 0x7e, 0xce, 0x5f, 0xf7, 0xa6]); 1782 1783 /// Extended data about the device path, which is used for many errors and 1784 /// progress codes to point to the device. 1785 /// The device path is used to point to the physical device in case there is more than one device 1786 /// belonging to the same subclass. For example, the system may contain two USB keyboards and one 1787 /// PS/2* keyboard. The driver that parses the status code can use the device path extended data to 1788 /// differentiate between the three. The index field is not useful in this case because there is no standard 1789 /// numbering convention. Device paths are preferred over using device handles because device handles 1790 /// for a given device can change from one boot to another and do not mean anything beyond Boot 1791 /// Services time. In certain cases, the bus driver may not create a device handle for a given device if it 1792 /// detects a critical error. In these cases, the device path extended data can be used to refer to the 1793 /// device, but there may not be any device handles with an instance of 1794 /// EFI_DEVICE_PATH_PROTOCOL that matches DevicePath. The variable device path structure 1795 /// is included in this structure to make it self sufficient. 1796 struct EFI_DEVICE_PATH_EXTENDED_DATA 1797 { 1798 /// 1799 /// The data header identifying the data. DataHeader.HeaderSize should be 1800 /// sizeof (EFI_STATUS_CODE_DATA). DataHeader.Size should be the size 1801 /// of variable-length DevicePath, and DataHeader.Size is zero for a virtual 1802 /// device that does not have a device path. DataHeader.Type should be 1803 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 1804 /// 1805 EFI_STATUS_CODE_DATA DataHeader; 1806 /// 1807 /// The device path to the controller or the hardware device. Note that this parameter is a 1808 /// variable-length device path structure and not a pointer to such a structure. This structure is 1809 /// populated only if it is a physical device. For virtual devices, the Size field in DataHeader 1810 /// is set to zero and this field is not populated. 1811 /// 1812 // EFI_DEVICE_PATH_PROTOCOL DevicePath; 1813 } 1814 /// Device handle Extended Data. Used for many 1815 /// errors and progress codes to point to the device. 1816 /// The handle of the device with which the progress or error code is associated. The handle is 1817 /// guaranteed to be accurate only at the time the status code is reported. Handles are dynamic entities 1818 /// between boots, so handles cannot be considered to be valid if the system has reset subsequent to the 1819 /// status code being reported. Handles may be used to determine a wide variety of useful information 1820 /// about the source of the status code. 1821 struct EFI_DEVICE_HANDLE_EXTENDED_DATA 1822 { 1823 /// 1824 /// The data header identifying the data. DataHeader.HeaderSize should be 1825 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 1826 /// sizeof (EFI_DEVICE_HANDLE_EXTENDED_DATA) - HeaderSize, and 1827 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 1828 /// 1829 EFI_STATUS_CODE_DATA DataHeader; 1830 /// 1831 /// The device handle. 1832 /// 1833 EFI_HANDLE Handle; 1834 } 1835 /// This structure defines extended data describing a PCI resource allocation error. 1836 /// @par Note: 1837 /// The following structure contains variable-length fields and cannot be defined as a C-style 1838 /// structure. 1839 /// This extended data conveys details for a PCI resource allocation failure error. See the PCI 1840 /// specification and the ACPI specification for details on PCI resource allocations and the format for 1841 /// resource descriptors. This error does not detail why the resource allocation failed. It may be due to a 1842 /// bad resource request or a lack of available resources to satisfy a valid request. The variable device 1843 /// path structure and the resource structures are included in this structure to make it self sufficient. 1844 struct EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA 1845 { 1846 /// 1847 /// The data header identifying the data. DataHeader.HeaderSize should be sizeof 1848 /// (EFI_STATUS_CODE_DATA), DataHeader.Size should be 1849 /// (DevicePathSize + DevicePathSize + DevicePathSize + 1850 /// sizeof(UINT32) + 3 * sizeof (UINT16) ), and DataHeader.Type 1851 /// should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 1852 /// 1853 EFI_STATUS_CODE_DATA DataHeader; 1854 /// 1855 /// The PCI BAR. Applicable only for PCI devices. Ignored for all other devices. 1856 /// 1857 UINT32 Bar; 1858 /// 1859 /// DevicePathSize should be zero if it is a virtual device that is not associated with 1860 /// a device path. Otherwise, this parameter is the length of the variable-length 1861 /// DevicePath. 1862 /// 1863 UINT16 DevicePathSize; 1864 /// 1865 /// Represents the size the ReqRes parameter. ReqResSize should be zero if the 1866 /// requested resources are not provided as a part of extended data. 1867 /// 1868 UINT16 ReqResSize; 1869 /// 1870 /// Represents the size the AllocRes parameter. AllocResSize should be zero if the 1871 /// allocated resources are not provided as a part of extended data. 1872 /// 1873 UINT16 AllocResSize; 1874 /// 1875 /// The device path to the controller or the hardware device that did not get the requested 1876 /// resources. Note that this parameter is the variable-length device path structure and not 1877 /// a pointer to this structure. 1878 /// 1879 // EFI_DEVICE_PATH_PROTOCOL DevicePath; 1880 /// 1881 /// The requested resources in the format of an ACPI 2.0 resource descriptor. This 1882 /// parameter is not a pointer; it is the complete resource descriptor. 1883 /// 1884 // UINT8 ReqRes[]; 1885 /// 1886 /// The allocated resources in the format of an ACPI 2.0 resource descriptor. This 1887 /// parameter is not a pointer; it is the complete resource descriptor. 1888 /// 1889 // UINT8 AllocRes[]; 1890 } 1891 /// This structure provides a calculation for base-10 representations. 1892 /// Not consistent with PI 1.2 Specification. 1893 /// This data type is not defined in the PI 1.2 Specification, but is 1894 /// required by several of the other data structures in this file. 1895 struct EFI_EXP_BASE10_DATA 1896 { 1897 /// 1898 /// The INT16 number by which to multiply the base-2 representation. 1899 /// 1900 INT16 Value; 1901 /// 1902 /// The INT16 number by which to raise the base-2 calculation. 1903 /// 1904 INT16 Exponent; 1905 } 1906 /// This structure provides the voltage at the time of error. It also provides 1907 /// the threshold value indicating the minimum or maximum voltage that is considered 1908 /// an error. If the voltage is less then the threshold, the error indicates that the 1909 /// voltage fell below the minimum acceptable value. If the voltage is greater then the threshold, 1910 /// the error indicates that the voltage rose above the maximum acceptable value. 1911 struct EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA 1912 { 1913 /// 1914 /// The data header identifying the data. DataHeader.HeaderSize should be 1915 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 1916 /// sizeof (EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA) - 1917 /// HeaderSize, and DataHeader.Type should be 1918 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 1919 /// 1920 EFI_STATUS_CODE_DATA DataHeader; 1921 /// 1922 /// The voltage value at the time of the error. 1923 /// 1924 EFI_EXP_BASE10_DATA Voltage; 1925 /// 1926 /// The voltage threshold. 1927 /// 1928 EFI_EXP_BASE10_DATA Threshold; 1929 } 1930 /// Microcode Update Extended Error Data 1931 struct EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA 1932 { 1933 /// 1934 /// The data header identifying the data. DataHeader.HeaderSize should be 1935 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 1936 /// sizeof (EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA) - 1937 /// HeaderSize, and DataHeader.Type should be 1938 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 1939 /// 1940 EFI_STATUS_CODE_DATA DataHeader; 1941 /// 1942 /// The version of the microcode update from the header. 1943 /// 1944 UINT32 Version; 1945 } 1946 /// This structure provides details about the computing unit timer expiration error. 1947 /// The timer limit provides the timeout value of the timer prior to expiration. 1948 struct EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA 1949 { 1950 /// 1951 /// The data header identifying the data. DataHeader.HeaderSize should be 1952 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 1953 /// sizeof (EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA) - 1954 /// HeaderSize, and DataHeader.Type should be 1955 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 1956 /// 1957 EFI_STATUS_CODE_DATA DataHeader; 1958 /// 1959 /// The number of seconds that the computing unit timer was configured to expire. 1960 /// 1961 EFI_EXP_BASE10_DATA TimerLimit; 1962 } 1963 /// Attribute bits for EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA.Attributes 1964 /// All other attributes are reserved for future use and must be initialized to 0. 1965 ///@{ 1966 enum EFI_COMPUTING_UNIT_MISMATCH_SPEED = 0x0001; 1967 enum EFI_COMPUTING_UNIT_MISMATCH_FSB_SPEED = 0x0002; 1968 enum EFI_COMPUTING_UNIT_MISMATCH_FAMILY = 0x0004; 1969 enum EFI_COMPUTING_UNIT_MISMATCH_MODEL = 0x0008; 1970 enum EFI_COMPUTING_UNIT_MISMATCH_STEPPING = 0x0010; 1971 enum EFI_COMPUTING_UNIT_MISMATCH_CACHE_SIZE = 0x0020; 1972 enum EFI_COMPUTING_UNIT_MISMATCH_OEM1 = 0x1000; 1973 enum EFI_COMPUTING_UNIT_MISMATCH_OEM2 = 0x2000; 1974 enum EFI_COMPUTING_UNIT_MISMATCH_OEM3 = 0x4000; 1975 enum EFI_COMPUTING_UNIT_MISMATCH_OEM4 = 0x8000; 1976 ///@} 1977 /// This structure defines extended data for processor mismatch errors. 1978 /// This provides information to indicate which processors mismatch, and how they mismatch. The 1979 /// status code contains the instance number of the processor that is in error. This structure's 1980 /// Instance indicates the second processor that does not match. This differentiation allows the 1981 /// consumer to determine which two processors do not match. The Attributes indicate what 1982 /// mismatch is being reported. Because Attributes is a bit field, more than one mismatch can be 1983 /// reported with one error code. 1984 struct EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA 1985 { 1986 /// 1987 /// The data header identifying the data. DataHeader.HeaderSize should be 1988 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 1989 /// sizeof (EFI_ HOST_PROCESSOR_MISMATCH_ERROR_DATA) - 1990 /// HeaderSize , and DataHeader.Type should be 1991 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 1992 /// 1993 EFI_STATUS_CODE_DATA DataHeader; 1994 /// 1995 /// The unit number of the computing unit that does not match. 1996 /// 1997 UINT32 Instance; 1998 /// 1999 /// The attributes describing the failure. 2000 /// 2001 UINT16 Attributes; 2002 } 2003 /// This structure provides details about the computing unit thermal failure. 2004 /// This structure provides the temperature at the time of error. It also provides the threshold value 2005 /// indicating the minimum temperature that is considered an error. 2006 struct EFI_COMPUTING_UNIT_THERMAL_ERROR_DATA 2007 { 2008 /// 2009 /// The data header identifying the data. DataHeader.HeaderSize should be 2010 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 2011 /// sizeof (EFI_COMPUTING_UNIT_THERMAL_ERROR_DATA) - 2012 /// HeaderSize , and DataHeader.Type should be 2013 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 2014 /// 2015 EFI_STATUS_CODE_DATA DataHeader; 2016 /// 2017 /// The thermal value at the time of the error. 2018 /// 2019 EFI_EXP_BASE10_DATA Temperature; 2020 /// 2021 /// The thermal threshold. 2022 /// 2023 EFI_EXP_BASE10_DATA Threshold; 2024 } 2025 /// Enumeration of valid cache types 2026 alias EFI_INIT_CACHE_TYPE = UINT32; 2027 enum : EFI_INIT_CACHE_TYPE 2028 { 2029 EfiInitCacheDataOnly, 2030 EfiInitCacheInstrOnly, 2031 EfiInitCacheBoth, 2032 EfiInitCacheUnspecified 2033 } 2034 /// Embedded cache init extended data 2035 struct EFI_CACHE_INIT_DATA 2036 { 2037 /// 2038 /// The data header identifying the data. DataHeader.HeaderSize should be 2039 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 2040 /// sizeof (EFI_CACHE_INIT_DATA) - HeaderSize , and 2041 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 2042 /// 2043 EFI_STATUS_CODE_DATA DataHeader; 2044 /// 2045 /// The cache level. Starts with 1 for level 1 cache. 2046 /// 2047 UINT32 Level; 2048 /// 2049 /// The type of cache. 2050 /// 2051 EFI_INIT_CACHE_TYPE Type; 2052 } 2053 2054 alias EFI_CPU_STATE_CHANGE_CAUSE = UINT32; 2055 /// The reasons that the processor is disabled. 2056 /// Used to fill in EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA.Cause. 2057 ///@{ 2058 enum EFI_CPU_CAUSE_INTERNAL_ERROR = 0x0001; 2059 enum EFI_CPU_CAUSE_THERMAL_ERROR = 0x0002; 2060 enum EFI_CPU_CAUSE_SELFTEST_FAILURE = 0x0004; 2061 enum EFI_CPU_CAUSE_PREBOOT_TIMEOUT = 0x0008; 2062 enum EFI_CPU_CAUSE_FAILED_TO_START = 0x0010; 2063 enum EFI_CPU_CAUSE_CONFIG_ERROR = 0x0020; 2064 enum EFI_CPU_CAUSE_USER_SELECTION = 0x0080; 2065 enum EFI_CPU_CAUSE_BY_ASSOCIATION = 0x0100; 2066 enum EFI_CPU_CAUSE_UNSPECIFIED = 0x8000; 2067 ///@} 2068 /// This structure provides information about the disabled computing unit. 2069 /// This structure provides details as to why and how the computing unit was disabled. The causes 2070 /// should cover the typical reasons a processor would be disabled. How the processor was disabled is 2071 /// important because there are distinct differences between hardware and software disabling. 2072 struct EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA 2073 { 2074 /// 2075 /// The data header identifying the data. DataHeader.HeaderSize should be 2076 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 2077 /// sizeof (EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA) - 2078 /// HeaderSize, and DataHeader.Type should be 2079 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 2080 /// 2081 EFI_STATUS_CODE_DATA DataHeader; 2082 /// 2083 /// The reason for disabling the processor. 2084 /// 2085 UINT32 Cause; 2086 /// 2087 /// TRUE if the processor is disabled via software means such as not listing it in the ACPI tables. 2088 /// Such a processor will respond to Interprocessor Interrupts (IPIs). FALSE if the processor is hardware 2089 /// disabled, which means it is invisible to software and will not respond to IPIs. 2090 /// 2091 BOOLEAN SoftwareDisabled; 2092 } 2093 /// Memory Error Granularity Definition 2094 alias EFI_MEMORY_ERROR_GRANULARITY = UINT8; 2095 /// Memory Error Granularities. Used to fill in EFI_MEMORY_EXTENDED_ERROR_DATA.Granularity. 2096 ///@{ 2097 enum EFI_MEMORY_ERROR_OTHER = 0x01; 2098 enum EFI_MEMORY_ERROR_UNKNOWN = 0x02; 2099 enum EFI_MEMORY_ERROR_DEVICE = 0x03; 2100 enum EFI_MEMORY_ERROR_PARTITION = 0x04; 2101 ///@} 2102 /// Memory Error Operation Definition 2103 alias EFI_MEMORY_ERROR_OPERATION = UINT8; 2104 /// Memory Error Operations. Used to fill in EFI_MEMORY_EXTENDED_ERROR_DATA.Operation. 2105 ///@{ 2106 enum EFI_MEMORY_OPERATION_OTHER = 0x01; 2107 enum EFI_MEMORY_OPERATION_UNKNOWN = 0x02; 2108 enum EFI_MEMORY_OPERATION_READ = 0x03; 2109 enum EFI_MEMORY_OPERATION_WRITE = 0x04; 2110 enum EFI_MEMORY_OPERATION_PARTIAL_WRITE = 0x05; 2111 ///@} 2112 /// This structure provides specific details about the memory error that was detected. It provides 2113 /// enough information so that consumers can identify the exact failure and provides enough 2114 /// information to enable corrective action if necessary. 2115 struct EFI_MEMORY_EXTENDED_ERROR_DATA 2116 { 2117 /// 2118 /// The data header identifying the data. DataHeader.HeaderSize should be 2119 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 2120 /// sizeof (EFI_MEMORY_EXTENDED_ERROR_DATA) - HeaderSize, and 2121 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 2122 /// 2123 EFI_STATUS_CODE_DATA DataHeader; 2124 /// 2125 /// The error granularity type. 2126 /// 2127 EFI_MEMORY_ERROR_GRANULARITY Granularity; 2128 /// 2129 /// The operation that resulted in the error being detected. 2130 /// 2131 EFI_MEMORY_ERROR_OPERATION Operation; 2132 /// 2133 /// The error syndrome, vendor-specific ECC syndrome, or CRC data associated with 2134 /// the error. If unknown, should be initialized to 0. 2135 /// Inconsistent with specification here: 2136 /// This field in StatusCodes spec0.9 is defined as UINT32, keep code unchanged. 2137 /// 2138 UINTN Syndrome; 2139 /// 2140 /// The physical address of the error. 2141 /// 2142 EFI_PHYSICAL_ADDRESS Address; 2143 /// 2144 /// The range, in bytes, within which the error address can be determined. 2145 /// 2146 UINTN Resolution; 2147 } 2148 /// A definition to describe that the operation is performed on multiple devices within the array. 2149 /// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device. 2150 enum EFI_MULTIPLE_MEMORY_DEVICE_OPERATION = 0xfffe; 2151 /// A definition to describe that the operation is performed on all devices within the array. 2152 /// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device. 2153 enum EFI_ALL_MEMORY_DEVICE_OPERATION = 0xffff; 2154 /// A definition to describe that the operation is performed on multiple arrays. 2155 /// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device. 2156 enum EFI_MULTIPLE_MEMORY_ARRAY_OPERATION = 0xfffe; 2157 /// A definition to describe that the operation is performed on all the arrays. 2158 /// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device. 2159 enum EFI_ALL_MEMORY_ARRAY_OPERATION = 0xffff; 2160 /// This extended data provides some context that consumers can use to locate a DIMM within the 2161 /// overall memory scheme. 2162 /// This extended data provides some context that consumers can use to locate a DIMM within the 2163 /// overall memory scheme. The Array and Device numbers may indicate a specific DIMM, or they 2164 /// may be populated with the group definitions in "Related Definitions" below. 2165 struct EFI_STATUS_CODE_DIMM_NUMBER 2166 { 2167 /// 2168 /// The data header identifying the data. DataHeader.HeaderSize should be 2169 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 2170 /// sizeof (EFI_STATUS_CODE_DIMM_NUMBER) - HeaderSize, and 2171 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 2172 /// 2173 EFI_STATUS_CODE_DATA DataHeader; 2174 /// 2175 /// The memory array number. 2176 /// 2177 UINT16 Array; 2178 /// 2179 /// The device number within that Array. 2180 /// 2181 UINT16 Device; 2182 } 2183 /// This structure defines extended data describing memory modules that do not match. 2184 /// This extended data may be used to convey the specifics of memory modules that do not match. 2185 struct EFI_MEMORY_MODULE_MISMATCH_ERROR_DATA 2186 { 2187 /// 2188 /// The data header identifying the data. DataHeader.HeaderSize should be 2189 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 2190 /// sizeof (EFI_MEMORY_MODULE_MISMATCH_ERROR_DATA) - 2191 /// HeaderSize, and DataHeader.Type should be 2192 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 2193 /// 2194 EFI_STATUS_CODE_DATA DataHeader; 2195 /// 2196 /// The instance number of the memory module that does not match. 2197 /// 2198 EFI_STATUS_CODE_DIMM_NUMBER Instance; 2199 } 2200 /// This structure defines extended data describing a memory range. 2201 /// This extended data may be used to convey the specifics of a memory range. Ranges are specified 2202 /// with a start address and a length. 2203 struct EFI_MEMORY_RANGE_EXTENDED_DATA 2204 { 2205 /// 2206 /// The data header identifying the data. DataHeader.HeaderSize should be 2207 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 2208 /// sizeof (EFI_MEMORY_RANGE_EXTENDED_DATA) - HeaderSize, and 2209 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 2210 /// 2211 EFI_STATUS_CODE_DATA DataHeader; 2212 /// 2213 /// The starting address of the memory range. 2214 /// 2215 EFI_PHYSICAL_ADDRESS Start; 2216 /// 2217 /// The length in bytes of the memory range. 2218 /// 2219 EFI_PHYSICAL_ADDRESS Length; 2220 } 2221 /// This structure provides the assert information that is typically associated with a debug assertion failing. 2222 /// The data indicates the location of the assertion that failed in the source code. This information 2223 /// includes the file name and line number that are necessary to find the failing assertion in source code. 2224 struct EFI_DEBUG_ASSERT_DATA 2225 { 2226 /// 2227 /// The data header identifying the data. DataHeader.HeaderSize should be 2228 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 2229 /// sizeof (EFI_DEBUG_ASSERT_DATA) - HeaderSize , and 2230 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 2231 /// 2232 EFI_STATUS_CODE_DATA DataHeader; 2233 /// 2234 /// The line number of the source file where the fault was generated. 2235 /// 2236 UINT32 LineNumber; 2237 /// 2238 /// The size in bytes of FileName. 2239 /// 2240 UINT32 FileNameSize; 2241 /// 2242 /// A pointer to a NULL-terminated ASCII or Unicode string that represents 2243 /// the file name of the source file where the fault was generated. 2244 /// 2245 EFI_STATUS_CODE_STRING_DATA* FileName; 2246 } 2247 /// System Context Data EBC/IA32/IPF 2248 union EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT 2249 { 2250 /// 2251 /// The context of the EBC virtual machine when the exception was generated. Type 2252 /// EFI_SYSTEM_CONTEXT_EBC is defined in EFI_DEBUG_SUPPORT_PROTOCOL 2253 /// in the UEFI Specification. 2254 /// 2255 EFI_SYSTEM_CONTEXT_EBC SystemContextEbc; 2256 /// 2257 /// The context of the IA-32 processor when the exception was generated. Type 2258 /// EFI_SYSTEM_CONTEXT_IA32 is defined in the 2259 /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification. 2260 /// 2261 EFI_SYSTEM_CONTEXT_IA32 SystemContextIa32; 2262 /// 2263 /// The context of the Itanium(R) processor when the exception was generated. Type 2264 /// EFI_SYSTEM_CONTEXT_IPF is defined in the 2265 /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification. 2266 /// 2267 EFI_SYSTEM_CONTEXT_IPF SystemContextIpf; 2268 /// 2269 /// The context of the X64 processor when the exception was generated. Type 2270 /// EFI_SYSTEM_CONTEXT_X64 is defined in the 2271 /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification. 2272 /// 2273 EFI_SYSTEM_CONTEXT_X64 SystemContextX64; 2274 /// 2275 /// The context of the ARM processor when the exception was generated. Type 2276 /// EFI_SYSTEM_CONTEXT_ARM is defined in the 2277 /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification. 2278 /// 2279 EFI_SYSTEM_CONTEXT_ARM SystemContextArm; 2280 } 2281 /// This structure defines extended data describing a processor exception error. 2282 /// This extended data allows the processor context that is present at the time of the exception to be 2283 /// reported with the exception. The format and contents of the context data varies depending on the 2284 /// processor architecture. 2285 struct EFI_STATUS_CODE_EXCEP_EXTENDED_DATA 2286 { 2287 /// 2288 /// The data header identifying the data. DataHeader.HeaderSize should be 2289 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 2290 /// sizeof (EFI_STATUS_CODE_EXCEP_EXTENDED_DATA) - HeaderSize, 2291 /// and DataHeader.Type should be 2292 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 2293 /// 2294 EFI_STATUS_CODE_DATA DataHeader; 2295 /// 2296 /// The system context. 2297 /// 2298 EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT Context; 2299 } 2300 /// This structure defines extended data describing a call to a driver binding protocol start function. 2301 /// This extended data records information about a Start() function call. Start() is a member of 2302 /// the UEFI Driver Binding Protocol. 2303 struct EFI_STATUS_CODE_START_EXTENDED_DATA 2304 { 2305 /// 2306 /// The data header identifying the data. DataHeader.HeaderSize should be 2307 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 2308 /// sizeof (EFI_STATUS_CODE_START_EXTENDED_DATA) - HeaderSize, 2309 /// and DataHeader.Type should be 2310 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 2311 /// 2312 EFI_STATUS_CODE_DATA DataHeader; 2313 /// 2314 /// The controller handle. 2315 /// 2316 EFI_HANDLE ControllerHandle; 2317 /// 2318 /// The driver binding handle. 2319 /// 2320 EFI_HANDLE DriverBindingHandle; 2321 /// 2322 /// The size of the RemainingDevicePath. It is zero if the Start() function is 2323 /// called with RemainingDevicePath = NULL. The UEFI Specification allows 2324 /// that the Start() function of bus drivers can be called in this way. 2325 /// 2326 UINT16 DevicePathSize; 2327 /// 2328 /// Matches the RemainingDevicePath parameter being passed to the Start() function. 2329 /// Note that this parameter is the variable-length device path and not a pointer 2330 /// to the device path. 2331 /// 2332 // EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath; 2333 } 2334 /// This structure defines extended data describing a legacy option ROM (OpROM). 2335 /// The device handle and ROM image base can be used by consumers to determine which option ROM 2336 /// failed. Due to the black-box nature of legacy option ROMs, the amount of information that can be 2337 /// obtained may be limited. 2338 struct EFI_LEGACY_OPROM_EXTENDED_DATA 2339 { 2340 /// 2341 /// The data header identifying the data. DataHeader.HeaderSize should be 2342 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 2343 /// sizeof (EFI_LEGACY_OPROM_EXTENDED_DATA) - HeaderSize, and 2344 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 2345 /// 2346 EFI_STATUS_CODE_DATA DataHeader; 2347 /// 2348 /// The handle corresponding to the device that this legacy option ROM is being invoked. 2349 /// 2350 EFI_HANDLE DeviceHandle; 2351 /// 2352 /// The base address of the shadowed legacy ROM image. May or may not point to the shadow RAM area. 2353 /// 2354 EFI_PHYSICAL_ADDRESS RomImageBase; 2355 } 2356 +/ 2357 enum EFI_GUID EFI_SYSTEM_RESOURCE_TABLE_GUID = EFI_GUID(0xb122a263, 0x3661, 2358 0x4f68, [0x99, 0x29, 0x78, 0xf8, 0xb0, 0xd6, 0x21, 0x80]); 2359 /// Current Entry Version 2360 enum EFI_SYSTEM_RESOURCE_TABLE_FIRMWARE_RESOURCE_VERSION = 1; 2361 /// Firmware Type Definitions 2362 enum ESRT_FW_TYPE_UNKNOWN = 0x00000000; 2363 enum ESRT_FW_TYPE_SYSTEMFIRMWARE = 0x00000001; 2364 enum ESRT_FW_TYPE_DEVICEFIRMWARE = 0x00000002; 2365 enum ESRT_FW_TYPE_UEFIDRIVER = 0x00000003; 2366 /// Last Attempt Status Values 2367 enum LAST_ATTEMPT_STATUS_SUCCESS = 0x00000000; 2368 enum LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL = 0x00000001; 2369 enum LAST_ATTEMPT_STATUS_ERROR_INSUFFICIENT_RESOURCES = 0x00000002; 2370 enum LAST_ATTEMPT_STATUS_ERROR_INCORRECT_VERSION = 0x00000003; 2371 enum LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT = 0x00000004; 2372 enum LAST_ATTEMPT_STATUS_ERROR_AUTH_ERROR = 0x00000005; 2373 enum LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_AC = 0x00000006; 2374 enum LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_BATT = 0x00000007; 2375 struct EFI_SYSTEM_RESOURCE_ENTRY 2376 { 2377 /// 2378 /// The firmware class field contains a GUID that identifies a firmware component 2379 /// that can be updated via UpdateCapsule(). This GUID must be unique within all 2380 /// entries of the ESRT. 2381 /// 2382 EFI_GUID FwClass; 2383 /// 2384 /// Identifies the type of firmware resource. 2385 /// 2386 UINT32 FwType; 2387 /// 2388 /// The firmware version field represents the current version of the firmware 2389 /// resource, value must always increase as a larger number represents a newer 2390 /// version. 2391 /// 2392 UINT32 FwVersion; 2393 /// 2394 /// The lowest firmware resource version to which a firmware resource can be 2395 /// rolled back for the given system/device. Generally this is used to protect 2396 /// against known and fixed security issues. 2397 /// 2398 UINT32 LowestSupportedFwVersion; 2399 /// 2400 /// The capsule flags field contains the CapsuleGuid flags (bits 0- 15) as defined 2401 /// in the EFI_CAPSULE_HEADER that will be set in the capsule header. 2402 /// 2403 UINT32 CapsuleFlags; 2404 /// 2405 /// The last attempt version field describes the last firmware version for which 2406 /// an update was attempted (uses the same format as Firmware Version). 2407 /// Last Attempt Version is updated each time an UpdateCapsule() is attempted for 2408 /// an ESRT entry and is preserved across reboots (non-). However, in 2409 /// cases where the attempt version is not recorded due to limitations in the 2410 /// update process, the field shall set to zero after a failed update. Similarly, 2411 /// in the case of a removable device, this value is set to 0 in cases where the 2412 /// device has not been updated since being added to the system. 2413 /// 2414 UINT32 LastAttemptVersion; 2415 /// 2416 /// The last attempt status field describes the result of the last firmware update 2417 /// attempt for the firmware resource entry. 2418 /// LastAttemptStatus is updated each time an UpdateCapsule() is attempted for an 2419 /// ESRT entry and is preserved across reboots (non-). 2420 /// If a firmware update has never been attempted or is unknown, for example after 2421 /// fresh insertion of a removable device, LastAttemptStatus must be set to Success. 2422 /// 2423 UINT32 LastAttemptStatus; 2424 } 2425 2426 struct EFI_SYSTEM_RESOURCE_TABLE 2427 { 2428 /// 2429 /// The number of firmware resources in the table, must not be zero. 2430 /// 2431 UINT32 FwResourceCount; 2432 /// 2433 /// The maximum number of resource array entries that can be within the table 2434 /// without reallocating the table, must not be zero. 2435 /// 2436 UINT32 FwResourceCountMax; 2437 /// 2438 /// The version of the EFI_SYSTEM_RESOURCE_ENTRY entities used in this table. 2439 /// This field should be set to 1. 2440 /// 2441 UINT64 FwResourceVersion; 2442 /// 2443 /// Array of EFI_SYSTEM_RESOURCE_ENTRY 2444 /// 2445 //EFI_SYSTEM_RESOURCE_ENTRY Entries[]; 2446 } 2447 // FIXME: INCLUDE <Ppi/VectorHandoffInfo.h> 2448 enum EFI_GUID EFI_VECTOR_HANDOF_TABLE_GUID = EFI_GUID(0x996ec11c, 0x5397, 2449 0x4e73, [0xb5, 0x8f, 0x82, 0x7e, 0x52, 0x90, 0x6d, 0xef]); 2450 enum WIN_CERT_TYPE_PKCS_SIGNED_DATA = 0x0002; 2451 enum WIN_CERT_TYPE_EFI_PKCS115 = 0x0EF0; 2452 enum WIN_CERT_TYPE_EFI_GUID = 0x0EF1; 2453 /// The WIN_CERTIFICATE structure is part of the PE/COFF specification. 2454 struct WIN_CERTIFICATE 2455 { 2456 /// 2457 /// The length of the entire certificate, 2458 /// including the length of the header, in bytes. 2459 /// 2460 UINT32 dwLength; 2461 /// 2462 /// The revision level of the WIN_CERTIFICATE 2463 /// structure. The current revision level is 0x0200. 2464 /// 2465 UINT16 wRevision; 2466 /// 2467 /// The certificate type. See WIN_CERT_TYPE_xxx for the UEFI 2468 /// certificate types. The UEFI specification reserves the range of 2469 /// certificate type values from 0x0EF0 to 0x0EFF. 2470 /// 2471 UINT16 wCertificateType; 2472 /// 2473 /// The following is the actual certificate. The format of 2474 /// the certificate depends on wCertificateType. 2475 /// 2476 /// UINT8 bCertificate[ANYSIZE_ARRAY]; 2477 /// 2478 } 2479 /// WIN_CERTIFICATE_UEFI_GUID.CertType 2480 enum EFI_GUID EFI_CERT_TYPE_RSA2048_SHA256_GUID = EFI_GUID(0xa7717414, 0xc616, 2481 0x4977, [0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf]); 2482 /// WIN_CERTIFICATE_UEFI_GUID.CertData 2483 struct EFI_CERT_BLOCK_RSA_2048_SHA256 2484 { 2485 EFI_GUID HashType; 2486 UINT8[256] PublicKey; 2487 UINT8[256] Signature; 2488 } 2489 /// Certificate which encapsulates a GUID-specific digital signature 2490 struct WIN_CERTIFICATE_UEFI_GUID 2491 { 2492 /// 2493 /// This is the standard WIN_CERTIFICATE header, where 2494 /// wCertificateType is set to WIN_CERT_TYPE_EFI_GUID. 2495 /// 2496 WIN_CERTIFICATE Hdr; 2497 /// 2498 /// This is the unique id which determines the 2499 /// format of the CertData. . 2500 /// 2501 EFI_GUID CertType; 2502 /// 2503 /// The following is the certificate data. The format of 2504 /// the data is determined by the CertType. 2505 /// If CertType is EFI_CERT_TYPE_RSA2048_SHA256_GUID, 2506 /// the CertData will be EFI_CERT_BLOCK_RSA_2048_SHA256 structure. 2507 /// 2508 UINT8[1] CertData; 2509 } 2510 /// Certificate which encapsulates the RSASSA_PKCS1-v1_5 digital signature. 2511 /// The WIN_CERTIFICATE_UEFI_PKCS1_15 structure is derived from 2512 /// WIN_CERTIFICATE and encapsulate the information needed to 2513 /// implement the RSASSA-PKCS1-v1_5 digital signature algorithm as 2514 /// specified in RFC2437. 2515 struct WIN_CERTIFICATE_EFI_PKCS1_15 2516 { 2517 /// 2518 /// This is the standard WIN_CERTIFICATE header, where 2519 /// wCertificateType is set to WIN_CERT_TYPE_UEFI_PKCS1_15. 2520 /// 2521 WIN_CERTIFICATE Hdr; 2522 /// 2523 /// This is the hashing algorithm which was performed on the 2524 /// UEFI executable when creating the digital signature. 2525 /// 2526 EFI_GUID HashAlgorithm; 2527 /// 2528 /// The following is the actual digital signature. The 2529 /// size of the signature is the same size as the key 2530 /// (1024-bit key is 128 bytes) and can be determined by 2531 /// subtracting the length of the other parts of this header 2532 /// from the total length of the certificate as found in 2533 /// Hdr.dwLength. 2534 /// 2535 /// UINT8 Signature[]; 2536 /// 2537 }