Lawrence Tang | 1b0b00e | 2022-07-05 10:33:10 +0100 | [diff] [blame] | 1 | /** @file
|
| 2 | GUIDs and definitions used for Common Platform Error Record.
|
| 3 |
|
| 4 | Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
| 5 | (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
| 6 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
| 7 |
|
| 8 | @par Revision Reference:
|
| 9 | GUIDs defined in UEFI 2.7 Specification.
|
| 10 |
|
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 11 | **/ |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 12 | |
| 13 | #ifndef __CPER_GUID_H__ |
| 14 | #define __CPER_GUID_H__ |
| 15 | |
Karthik Rajagopalan | 255bd81 | 2024-09-06 14:36:34 -0700 | [diff] [blame^] | 16 | #include "BaseTypes.h" |
| 17 | |
| 18 | #ifdef __cplusplus |
| 19 | extern "C" { |
| 20 | #endif |
| 21 | |
Ed Tanous | c6fead1 | 2024-06-18 13:15:58 -0700 | [diff] [blame] | 22 | #pragma pack(push, 1) |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 23 | |
| 24 | #define EFI_ERROR_RECORD_SIGNATURE_START SIGNATURE_32('C', 'P', 'E', 'R') |
| 25 | #define EFI_ERROR_RECORD_SIGNATURE_END 0xFFFFFFFF |
| 26 | |
| 27 | #define EFI_ERROR_RECORD_REVISION 0x0101 |
| 28 | |
| 29 | /// |
| 30 | /// Error Severity in Error Record Header and Error Section Descriptor |
| 31 | ///@{ |
| 32 | #define EFI_GENERIC_ERROR_RECOVERABLE 0x00000000 |
| 33 | #define EFI_GENERIC_ERROR_FATAL 0x00000001 |
| 34 | #define EFI_GENERIC_ERROR_CORRECTED 0x00000002 |
| 35 | #define EFI_GENERIC_ERROR_INFO 0x00000003 |
| 36 | ///@} |
| 37 | |
| 38 | /// |
| 39 | /// The validation bit mask indicates the validity of the following fields |
| 40 | /// in Error Record Header. |
| 41 | ///@{ |
| 42 | #define EFI_ERROR_RECORD_HEADER_PLATFORM_ID_VALID BIT0 |
| 43 | #define EFI_ERROR_RECORD_HEADER_TIME_STAMP_VALID BIT1 |
| 44 | #define EFI_ERROR_RECORD_HEADER_PARTITION_ID_VALID BIT2 |
| 45 | ///@} |
| 46 | |
| 47 | /// |
| 48 | /// Timestamp is precise if this bit is set and correlates to the time of the |
| 49 | /// error event. |
| 50 | /// |
| 51 | #define EFI_ERROR_TIME_STAMP_PRECISE BIT0 |
| 52 | |
| 53 | /// |
| 54 | /// The timestamp correlates to the time when the error information was collected |
| 55 | /// by the system software and may not necessarily represent the time of the error |
| 56 | /// event. The timestamp contains the local time in BCD format. |
| 57 | /// |
| 58 | typedef struct { |
| 59 | UINT8 Seconds; |
| 60 | UINT8 Minutes; |
| 61 | UINT8 Hours; |
| 62 | UINT8 Flag; |
| 63 | UINT8 Day; |
| 64 | UINT8 Month; |
| 65 | UINT8 Year; |
| 66 | UINT8 Century; |
| 67 | } EFI_ERROR_TIME_STAMP; |
| 68 | |
| 69 | /// |
| 70 | /// GUID value indicating the record association with an error event notification type. |
| 71 | ///@{ |
| 72 | #define EFI_EVENT_NOTIFICATION_TYEP_CMC_GUID \ |
| 73 | { \ |
| 74 | 0x2DCE8BB1, 0xBDD7, 0x450e, \ |
| 75 | { \ |
| 76 | 0xB9, 0xAD, 0x9C, 0xF4, 0xEB, 0xD4, 0xF8, 0x90 \ |
| 77 | } \ |
| 78 | } |
| 79 | #define EFI_EVENT_NOTIFICATION_TYEP_CPE_GUID \ |
| 80 | { \ |
| 81 | 0x4E292F96, 0xD843, 0x4a55, \ |
| 82 | { \ |
| 83 | 0xA8, 0xC2, 0xD4, 0x81, 0xF2, 0x7E, 0xBE, 0xEE \ |
| 84 | } \ |
| 85 | } |
| 86 | #define EFI_EVENT_NOTIFICATION_TYEP_MCE_GUID \ |
| 87 | { \ |
| 88 | 0xE8F56FFE, 0x919C, 0x4cc5, \ |
| 89 | { \ |
| 90 | 0xBA, 0x88, 0x65, 0xAB, 0xE1, 0x49, 0x13, 0xBB \ |
| 91 | } \ |
| 92 | } |
| 93 | #define EFI_EVENT_NOTIFICATION_TYEP_PCIE_GUID \ |
| 94 | { \ |
| 95 | 0xCF93C01F, 0x1A16, 0x4dfc, \ |
| 96 | { \ |
| 97 | 0xB8, 0xBC, 0x9C, 0x4D, 0xAF, 0x67, 0xC1, 0x04 \ |
| 98 | } \ |
| 99 | } |
| 100 | #define EFI_EVENT_NOTIFICATION_TYEP_INIT_GUID \ |
| 101 | { \ |
| 102 | 0xCC5263E8, 0x9308, 0x454a, \ |
| 103 | { \ |
| 104 | 0x89, 0xD0, 0x34, 0x0B, 0xD3, 0x9B, 0xC9, 0x8E \ |
| 105 | } \ |
| 106 | } |
| 107 | #define EFI_EVENT_NOTIFICATION_TYEP_NMI_GUID \ |
| 108 | { \ |
| 109 | 0x5BAD89FF, 0xB7E6, 0x42c9, \ |
| 110 | { \ |
| 111 | 0x81, 0x4A, 0xCF, 0x24, 0x85, 0xD6, 0xE9, 0x8A \ |
| 112 | } \ |
| 113 | } |
| 114 | #define EFI_EVENT_NOTIFICATION_TYEP_BOOT_GUID \ |
| 115 | { \ |
| 116 | 0x3D61A466, 0xAB40, 0x409a, \ |
| 117 | { \ |
| 118 | 0xA6, 0x98, 0xF3, 0x62, 0xD4, 0x64, 0xB3, 0x8F \ |
| 119 | } \ |
| 120 | } |
| 121 | #define EFI_EVENT_NOTIFICATION_TYEP_DMAR_GUID \ |
| 122 | { \ |
| 123 | 0x667DD791, 0xC6B3, 0x4c27, \ |
| 124 | { \ |
| 125 | 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 \ |
| 126 | } \ |
| 127 | } |
| 128 | #define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEA \ |
| 129 | { \ |
| 130 | 0x9A78788A, 0xBBE8, 0x11E4, \ |
| 131 | { \ |
| 132 | 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 \ |
| 133 | } \ |
| 134 | } |
| 135 | #define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEI \ |
| 136 | { \ |
| 137 | 0x5C284C81, 0xB0AE, 0x4E87, \ |
| 138 | { \ |
| 139 | 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 \ |
| 140 | } \ |
| 141 | } |
| 142 | #define EFI_EVENT_NOTIFICATION_TYPE_DMAR_PEI \ |
| 143 | { \ |
| 144 | 0x09A9D5AC, 0x5204, 0x4214, \ |
| 145 | { \ |
| 146 | 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD \ |
| 147 | } \ |
| 148 | } |
| 149 | ///@} |
| 150 | |
| 151 | /// |
| 152 | /// Error Record Header Flags |
| 153 | ///@{ |
| 154 | #define EFI_HW_ERROR_FLAGS_RECOVERED 0x00000001 |
| 155 | #define EFI_HW_ERROR_FLAGS_PREVERR 0x00000002 |
| 156 | #define EFI_HW_ERROR_FLAGS_SIMULATED 0x00000004 |
| 157 | ///@} |
| 158 | |
| 159 | /// |
| 160 | /// Common error record header |
| 161 | /// |
| 162 | typedef struct { |
| 163 | UINT32 SignatureStart; |
| 164 | UINT16 Revision; |
| 165 | UINT32 SignatureEnd; |
| 166 | UINT16 SectionCount; |
| 167 | UINT32 ErrorSeverity; |
| 168 | UINT32 ValidationBits; |
| 169 | UINT32 RecordLength; |
| 170 | EFI_ERROR_TIME_STAMP TimeStamp; |
| 171 | EFI_GUID PlatformID; |
| 172 | EFI_GUID PartitionID; |
| 173 | EFI_GUID CreatorID; |
| 174 | EFI_GUID NotificationType; |
| 175 | UINT64 RecordID; |
| 176 | UINT32 Flags; |
| 177 | UINT64 PersistenceInfo; |
| 178 | UINT8 Resv1[12]; |
| 179 | /// |
| 180 | /// An array of SectionCount descriptors for the associated |
| 181 | /// sections. The number of valid sections is equivalent to the |
| 182 | /// SectionCount. The buffer size of the record may include |
| 183 | /// more space to dynamically add additional Section |
| 184 | /// Descriptors to the error record. |
| 185 | /// |
| 186 | } EFI_COMMON_ERROR_RECORD_HEADER; |
| 187 | |
| 188 | #define EFI_ERROR_SECTION_REVISION 0x0100 |
| 189 | |
| 190 | /// |
| 191 | /// Validity Fields in Error Section Descriptor. |
| 192 | /// |
| 193 | #define EFI_ERROR_SECTION_FRU_ID_VALID BIT0 |
| 194 | #define EFI_ERROR_SECTION_FRU_STRING_VALID BIT1 |
| 195 | |
| 196 | /// |
| 197 | /// Flag field contains information that describes the error section |
| 198 | /// in Error Section Descriptor. |
| 199 | /// |
| 200 | #define EFI_ERROR_SECTION_FLAGS_PRIMARY BIT0 |
| 201 | #define EFI_ERROR_SECTION_FLAGS_CONTAINMENT_WARNING BIT1 |
| 202 | #define EFI_ERROR_SECTION_FLAGS_RESET BIT2 |
| 203 | #define EFI_ERROR_SECTION_FLAGS_ERROR_THRESHOLD_EXCEEDED BIT3 |
| 204 | #define EFI_ERROR_SECTION_FLAGS_RESOURCE_NOT_ACCESSIBLE BIT4 |
| 205 | #define EFI_ERROR_SECTION_FLAGS_LATENT_ERROR BIT5 |
| 206 | |
| 207 | /// |
| 208 | /// Error Sectition Type GUIDs in Error Section Descriptor |
| 209 | ///@{ |
| 210 | #define EFI_ERROR_SECTION_PROCESSOR_GENERIC_GUID \ |
| 211 | { \ |
| 212 | 0x9876ccad, 0x47b4, 0x4bdb, \ |
| 213 | { \ |
| 214 | 0xb6, 0x5e, 0x16, 0xf1, 0x93, 0xc4, 0xf3, 0xdb \ |
| 215 | } \ |
| 216 | } |
| 217 | #define EFI_ERROR_SECTION_PROCESSOR_SPECIFIC_GUID \ |
| 218 | { \ |
| 219 | 0xdc3ea0b0, 0xa144, 0x4797, \ |
| 220 | { \ |
| 221 | 0xb9, 0x5b, 0x53, 0xfa, 0x24, 0x2b, 0x6e, 0x1d \ |
| 222 | } \ |
| 223 | } |
| 224 | #define EFI_ERROR_SECTION_PROCESSOR_SPECIFIC_IA32X64_GUID \ |
| 225 | { \ |
| 226 | 0xdc3ea0b0, 0xa144, 0x4797, \ |
| 227 | { \ |
| 228 | 0xb9, 0x5b, 0x53, 0xfa, 0x24, 0x2b, 0x6e, 0x1d \ |
| 229 | } \ |
| 230 | } |
| 231 | #define EFI_ERROR_SECTION_PROCESSOR_SPECIFIC_ARM_GUID \ |
| 232 | { \ |
| 233 | 0xe19e3d16, 0xbc11, 0x11e4, \ |
| 234 | { \ |
| 235 | 0x9c, 0xaa, 0xc2, 0x05, 0x1d, 0x5d, 0x46, 0xb0 \ |
| 236 | } \ |
| 237 | } |
| 238 | #define EFI_ERROR_SECTION_PLATFORM_MEMORY_GUID \ |
| 239 | { \ |
| 240 | 0xa5bc1114, 0x6f64, 0x4ede, \ |
| 241 | { \ |
| 242 | 0xb8, 0x63, 0x3e, 0x83, 0xed, 0x7c, 0x83, 0xb1 \ |
| 243 | } \ |
| 244 | } |
| 245 | #define EFI_ERROR_SECTION_PLATFORM_MEMORY2_GUID \ |
| 246 | { \ |
| 247 | 0x61EC04FC, 0x48E6, 0xD813, \ |
| 248 | { \ |
| 249 | 0x25, 0xC9, 0x8D, 0xAA, 0x44, 0x75, 0x0B, 0x12 \ |
| 250 | } \ |
| 251 | } |
| 252 | #define EFI_ERROR_SECTION_PCIE_GUID \ |
| 253 | { \ |
| 254 | 0xd995e954, 0xbbc1, 0x430f, \ |
| 255 | { \ |
| 256 | 0xad, 0x91, 0xb4, 0x4d, 0xcb, 0x3c, 0x6f, 0x35 \ |
| 257 | } \ |
| 258 | } |
| 259 | #define EFI_ERROR_SECTION_FW_ERROR_RECORD_GUID \ |
| 260 | { \ |
| 261 | 0x81212a96, 0x09ed, 0x4996, \ |
| 262 | { \ |
| 263 | 0x94, 0x71, 0x8d, 0x72, 0x9c, 0x8e, 0x69, 0xed \ |
| 264 | } \ |
| 265 | } |
| 266 | #define EFI_ERROR_SECTION_PCI_PCIX_BUS_GUID \ |
| 267 | { \ |
| 268 | 0xc5753963, 0x3b84, 0x4095, \ |
| 269 | { \ |
| 270 | 0xbf, 0x78, 0xed, 0xda, 0xd3, 0xf9, 0xc9, 0xdd \ |
| 271 | } \ |
| 272 | } |
| 273 | #define EFI_ERROR_SECTION_PCI_DEVICE_GUID \ |
| 274 | { \ |
| 275 | 0xeb5e4685, 0xca66, 0x4769, \ |
| 276 | { \ |
| 277 | 0xb6, 0xa2, 0x26, 0x06, 0x8b, 0x00, 0x13, 0x26 \ |
| 278 | } \ |
| 279 | } |
| 280 | #define EFI_ERROR_SECTION_DMAR_GENERIC_GUID \ |
| 281 | { \ |
| 282 | 0x5b51fef7, 0xc79d, 0x4434, \ |
| 283 | { \ |
| 284 | 0x8f, 0x1b, 0xaa, 0x62, 0xde, 0x3e, 0x2c, 0x64 \ |
| 285 | } \ |
| 286 | } |
| 287 | #define EFI_ERROR_SECTION_DIRECTED_IO_DMAR_GUID \ |
| 288 | { \ |
| 289 | 0x71761d37, 0x32b2, 0x45cd, \ |
| 290 | { \ |
| 291 | 0xa7, 0xd0, 0xb0, 0xfe, 0xdd, 0x93, 0xe8, 0xcf \ |
| 292 | } \ |
| 293 | } |
| 294 | #define EFI_ERROR_SECTION_IOMMU_DMAR_GUID \ |
| 295 | { \ |
| 296 | 0x036f84e1, 0x7f37, 0x428c, \ |
| 297 | { \ |
| 298 | 0xa7, 0x9e, 0x57, 0x5f, 0xdf, 0xaa, 0x84, 0xec \ |
| 299 | } \ |
| 300 | } |
| 301 | ///@} |
| 302 | |
| 303 | /// |
| 304 | /// Error Section Descriptor |
| 305 | /// |
| 306 | typedef struct { |
| 307 | UINT32 SectionOffset; |
| 308 | UINT32 SectionLength; |
| 309 | UINT16 Revision; |
| 310 | UINT8 SecValidMask; |
| 311 | UINT8 Resv1; |
| 312 | UINT32 SectionFlags; |
| 313 | EFI_GUID SectionType; |
| 314 | EFI_GUID FruId; |
| 315 | UINT32 Severity; |
| 316 | CHAR8 FruString[20]; |
| 317 | } EFI_ERROR_SECTION_DESCRIPTOR; |
| 318 | |
| 319 | /// |
| 320 | /// The validation bit mask indicates whether or not each of the following fields are |
| 321 | /// valid in Proessor Generic Error section. |
| 322 | ///@{ |
| 323 | #define EFI_GENERIC_ERROR_PROC_TYPE_VALID BIT0 |
| 324 | #define EFI_GENERIC_ERROR_PROC_ISA_VALID BIT1 |
| 325 | #define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_VALID BIT2 |
| 326 | #define EFI_GENERIC_ERROR_PROC_OPERATION_VALID BIT3 |
| 327 | #define EFI_GENERIC_ERROR_PROC_FLAGS_VALID BIT4 |
| 328 | #define EFI_GENERIC_ERROR_PROC_LEVEL_VALID BIT5 |
| 329 | #define EFI_GENERIC_ERROR_PROC_VERSION_VALID BIT6 |
| 330 | #define EFI_GENERIC_ERROR_PROC_BRAND_VALID BIT7 |
| 331 | #define EFI_GENERIC_ERROR_PROC_ID_VALID BIT8 |
| 332 | #define EFI_GENERIC_ERROR_PROC_TARGET_ADDR_VALID BIT9 |
| 333 | #define EFI_GENERIC_ERROR_PROC_REQUESTER_ID_VALID BIT10 |
| 334 | #define EFI_GENERIC_ERROR_PROC_RESPONDER_ID_VALID BIT11 |
| 335 | #define EFI_GENERIC_ERROR_PROC_INST_IP_VALID BIT12 |
| 336 | ///@} |
| 337 | |
| 338 | /// |
| 339 | /// The type of the processor architecture in Proessor Generic Error section. |
| 340 | ///@{ |
| 341 | #define EFI_GENERIC_ERROR_PROC_TYPE_IA32_X64 0x00 |
| 342 | #define EFI_GENERIC_ERROR_PROC_TYPE_IA64 0x01 |
| 343 | #define EFI_GENERIC_ERROR_PROC_TYPE_ARM 0x02 |
| 344 | ///@} |
| 345 | |
| 346 | /// |
| 347 | /// The type of the instruction set executing when the error occurred in Proessor |
| 348 | /// Generic Error section. |
| 349 | ///@{ |
| 350 | #define EFI_GENERIC_ERROR_PROC_ISA_IA32 0x00 |
| 351 | #define EFI_GENERIC_ERROR_PROC_ISA_IA64 0x01 |
| 352 | #define EFI_GENERIC_ERROR_PROC_ISA_X64 0x02 |
| 353 | #define EFI_GENERIC_ERROR_PROC_ISA_ARM_A32_T32 0x03 |
| 354 | #define EFI_GENERIC_ERROR_PROC_ISA_ARM_A64 0x04 |
| 355 | ///@} |
| 356 | |
| 357 | /// |
| 358 | /// The type of error that occurred in Proessor Generic Error section. |
| 359 | ///@{ |
| 360 | #define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_UNKNOWN 0x00 |
| 361 | #define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_CACHE 0x01 |
| 362 | #define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_TLB 0x02 |
| 363 | #define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_BUS 0x04 |
| 364 | #define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_MICRO_ARCH 0x08 |
| 365 | ///@} |
| 366 | |
| 367 | /// |
| 368 | /// The type of operation in Proessor Generic Error section. |
| 369 | ///@{ |
| 370 | #define EFI_GENERIC_ERROR_PROC_OPERATION_GENERIC 0x00 |
| 371 | #define EFI_GENERIC_ERROR_PROC_OPERATION_DATA_READ 0x01 |
| 372 | #define EFI_GENERIC_ERROR_PROC_OPERATION_DATA_WRITE 0x02 |
| 373 | #define EFI_GENERIC_ERROR_PROC_OPERATION_INSTRUCTION_EXEC 0x03 |
| 374 | ///@} |
| 375 | |
| 376 | /// |
| 377 | /// Flags bit mask indicates additional information about the error in Proessor Generic |
| 378 | /// Error section |
| 379 | ///@{ |
| 380 | #define EFI_GENERIC_ERROR_PROC_FLAGS_RESTARTABLE BIT0 |
| 381 | #define EFI_GENERIC_ERROR_PROC_FLAGS_PRECISE_IP BIT1 |
| 382 | #define EFI_GENERIC_ERROR_PROC_FLAGS_OVERFLOW BIT2 |
| 383 | #define EFI_GENERIC_ERROR_PROC_FLAGS_CORRECTED BIT3 |
| 384 | ///@} |
| 385 | |
| 386 | /// |
| 387 | /// Processor Generic Error Section |
| 388 | /// describes processor reported hardware errors for logical processors in the system. |
| 389 | /// |
| 390 | typedef struct { |
| 391 | UINT64 ValidFields; |
| 392 | UINT8 Type; |
| 393 | UINT8 Isa; |
| 394 | UINT8 ErrorType; |
| 395 | UINT8 Operation; |
| 396 | UINT8 Flags; |
| 397 | UINT8 Level; |
| 398 | UINT16 Resv1; |
| 399 | UINT64 VersionInfo; |
| 400 | CHAR8 BrandString[128]; |
| 401 | UINT64 ApicId; |
| 402 | UINT64 TargetAddr; |
| 403 | UINT64 RequestorId; |
| 404 | UINT64 ResponderId; |
| 405 | UINT64 InstructionIP; |
| 406 | } EFI_PROCESSOR_GENERIC_ERROR_DATA; |
| 407 | |
| 408 | /// |
| 409 | /// IA32 and x64 Specific definitions. |
| 410 | /// |
| 411 | |
| 412 | /// |
| 413 | /// GUID value indicating the type of Processor Error Information structure |
| 414 | /// in IA32/X64 Processor Error Information Structure. |
| 415 | ///@{ |
| 416 | #define EFI_IA32_X64_ERROR_TYPE_CACHE_CHECK_GUID \ |
| 417 | { \ |
| 418 | 0xA55701F5, 0xE3EF, 0x43de, \ |
| 419 | { \ |
| 420 | 0xAC, 0x72, 0x24, 0x9B, 0x57, 0x3F, 0xAD, 0x2C \ |
| 421 | } \ |
| 422 | } |
| 423 | #define EFI_IA32_X64_ERROR_TYPE_TLB_CHECK_GUID \ |
| 424 | { \ |
| 425 | 0xFC06B535, 0x5E1F, 0x4562, \ |
| 426 | { \ |
| 427 | 0x9F, 0x25, 0x0A, 0x3B, 0x9A, 0xDB, 0x63, 0xC3 \ |
| 428 | } \ |
| 429 | } |
| 430 | #define EFI_IA32_X64_ERROR_TYPE_BUS_CHECK_GUID \ |
| 431 | { \ |
| 432 | 0x1CF3F8B3, 0xC5B1, 0x49a2, \ |
| 433 | { \ |
| 434 | 0xAA, 0x59, 0x5E, 0xEF, 0x92, 0xFF, 0xA6, 0x3C \ |
| 435 | } \ |
| 436 | } |
| 437 | #define EFI_IA32_X64_ERROR_TYPE_MS_CHECK_GUID \ |
| 438 | { \ |
| 439 | 0x48AB7F57, 0xDC34, 0x4f6c, \ |
| 440 | { \ |
| 441 | 0xA7, 0xD3, 0xB0, 0xB5, 0xB0, 0xA7, 0x43, 0x14 \ |
| 442 | } \ |
| 443 | } |
| 444 | extern EFI_GUID gEfiIa32x64ErrorTypeCacheCheckGuid; |
| 445 | extern EFI_GUID gEfiIa32x64ErrorTypeTlbCheckGuid; |
| 446 | extern EFI_GUID gEfiIa32x64ErrorTypeBusCheckGuid; |
| 447 | extern EFI_GUID gEfiIa32x64ErrorTypeMsCheckGuid; |
| 448 | |
| 449 | ///@} |
| 450 | |
| 451 | /// |
| 452 | /// The validation bit mask indicates which fields in the IA32/X64 Processor |
| 453 | /// Error Record structure are valid. |
| 454 | ///@{ |
| 455 | #define EFI_IA32_X64_PROCESSOR_ERROR_APIC_ID_VALID BIT0 |
| 456 | #define EFI_IA32_X64_PROCESSOR_ERROR_CPU_ID_INFO_VALID BIT1 |
| 457 | ///@} |
| 458 | |
| 459 | /// |
| 460 | /// IA32/X64 Processor Error Record |
| 461 | /// |
| 462 | typedef struct { |
| 463 | UINT64 ValidFields; |
| 464 | UINT64 ApicId; |
| 465 | UINT8 CpuIdInfo[48]; |
| 466 | } EFI_IA32_X64_PROCESSOR_ERROR_RECORD; |
| 467 | |
| 468 | /// |
| 469 | /// The validation bit mask indicates which fields in the Cache Check structure |
| 470 | /// are valid. |
| 471 | ///@{ |
| 472 | #define EFI_CACHE_CHECK_TRANSACTION_TYPE_VALID BIT0 |
| 473 | #define EFI_CACHE_CHECK_OPERATION_VALID BIT1 |
| 474 | #define EFI_CACHE_CHECK_LEVEL_VALID BIT2 |
| 475 | #define EFI_CACHE_CHECK_CONTEXT_CORRUPT_VALID BIT3 |
| 476 | #define EFI_CACHE_CHECK_UNCORRECTED_VALID BIT4 |
| 477 | #define EFI_CACHE_CHECK_PRECISE_IP_VALID BIT5 |
| 478 | #define EFI_CACHE_CHECK_RESTARTABLE_VALID BIT6 |
| 479 | #define EFI_CACHE_CHECK_OVERFLOW_VALID BIT7 |
| 480 | ///@} |
| 481 | |
| 482 | /// |
| 483 | /// Type of cache error in the Cache Check structure |
| 484 | ///@{ |
| 485 | #define EFI_CACHE_CHECK_ERROR_TYPE_INSTRUCTION 0 |
| 486 | #define EFI_CACHE_CHECK_ERROR_TYPE_DATA_ACCESS 1 |
| 487 | #define EFI_CACHE_CHECK_ERROR_TYPE_GENERIC 2 |
| 488 | ///@} |
| 489 | |
| 490 | /// |
| 491 | /// Type of cache operation that caused the error in the Cache |
| 492 | /// Check structure |
| 493 | ///@{ |
| 494 | #define EFI_CACHE_CHECK_OPERATION_TYPE_GENERIC 0 |
| 495 | #define EFI_CACHE_CHECK_OPERATION_TYPE_GENERIC_READ 1 |
| 496 | #define EFI_CACHE_CHECK_OPERATION_TYPE_GENERIC_WRITE 2 |
| 497 | #define EFI_CACHE_CHECK_OPERATION_TYPE_DATA_READ 3 |
| 498 | #define EFI_CACHE_CHECK_OPERATION_TYPE_DATA_WRITE 4 |
| 499 | #define EFI_CACHE_CHECK_OPERATION_TYPE_INSTRUCTION_FETCH 5 |
| 500 | #define EFI_CACHE_CHECK_OPERATION_TYPE_PREFETCH 6 |
| 501 | #define EFI_CACHE_CHECK_OPERATION_TYPE_EVICTION 7 |
| 502 | #define EFI_CACHE_CHECK_OPERATION_TYPE_SNOOP 8 |
| 503 | ///@} |
| 504 | |
| 505 | /// |
| 506 | /// IA32/X64 Cache Check Structure |
| 507 | /// |
| 508 | typedef struct { |
| 509 | UINT64 ValidFields : 16; |
| 510 | UINT64 TransactionType : 2; |
| 511 | UINT64 Operation : 4; |
| 512 | UINT64 Level : 3; |
| 513 | UINT64 ContextCorrupt : 1; |
| 514 | UINT64 ErrorUncorrected : 1; |
| 515 | UINT64 PreciseIp : 1; |
| 516 | UINT64 RestartableIp : 1; |
| 517 | UINT64 Overflow : 1; |
| 518 | UINT64 Resv1 : 34; |
| 519 | } EFI_IA32_X64_CACHE_CHECK_INFO; |
| 520 | |
| 521 | /// |
| 522 | /// The validation bit mask indicates which fields in the TLB Check structure |
| 523 | /// are valid. |
| 524 | ///@{ |
| 525 | #define EFI_TLB_CHECK_TRANSACTION_TYPE_VALID BIT0 |
| 526 | #define EFI_TLB_CHECK_OPERATION_VALID BIT1 |
| 527 | #define EFI_TLB_CHECK_LEVEL_VALID BIT2 |
| 528 | #define EFI_TLB_CHECK_CONTEXT_CORRUPT_VALID BIT3 |
| 529 | #define EFI_TLB_CHECK_UNCORRECTED_VALID BIT4 |
| 530 | #define EFI_TLB_CHECK_PRECISE_IP_VALID BIT5 |
| 531 | #define EFI_TLB_CHECK_RESTARTABLE_VALID BIT6 |
| 532 | #define EFI_TLB_CHECK_OVERFLOW_VALID BIT7 |
| 533 | ///@} |
| 534 | |
| 535 | /// |
| 536 | /// Type of cache error in the TLB Check structure |
| 537 | ///@{ |
| 538 | #define EFI_TLB_CHECK_ERROR_TYPE_INSTRUCTION 0 |
| 539 | #define EFI_TLB_CHECK_ERROR_TYPE_DATA_ACCESS 1 |
| 540 | #define EFI_TLB_CHECK_ERROR_TYPE_GENERIC 2 |
| 541 | ///@} |
| 542 | |
| 543 | /// |
| 544 | /// Type of cache operation that caused the error in the TLB |
| 545 | /// Check structure |
| 546 | ///@{ |
| 547 | #define EFI_TLB_CHECK_OPERATION_TYPE_GENERIC 0 |
| 548 | #define EFI_TLB_CHECK_OPERATION_TYPE_GENERIC_READ 1 |
| 549 | #define EFI_TLB_CHECK_OPERATION_TYPE_GENERIC_WRITE 2 |
| 550 | #define EFI_TLB_CHECK_OPERATION_TYPE_DATA_READ 3 |
| 551 | #define EFI_TLB_CHECK_OPERATION_TYPE_DATA_WRITE 4 |
| 552 | #define EFI_TLB_CHECK_OPERATION_TYPE_INST_FETCH 5 |
| 553 | #define EFI_TLB_CHECK_OPERATION_TYPE_PREFETCH 6 |
| 554 | ///@} |
| 555 | |
| 556 | /// |
| 557 | /// IA32/X64 TLB Check Structure |
| 558 | /// |
| 559 | typedef struct { |
| 560 | UINT64 ValidFields : 16; |
| 561 | UINT64 TransactionType : 2; |
| 562 | UINT64 Operation : 4; |
| 563 | UINT64 Level : 3; |
| 564 | UINT64 ContextCorrupt : 1; |
| 565 | UINT64 ErrorUncorrected : 1; |
| 566 | UINT64 PreciseIp : 1; |
| 567 | UINT64 RestartableIp : 1; |
| 568 | UINT64 Overflow : 1; |
| 569 | UINT64 Resv1 : 34; |
| 570 | } EFI_IA32_X64_TLB_CHECK_INFO; |
| 571 | |
| 572 | /// |
| 573 | /// The validation bit mask indicates which fields in the MS Check structure |
| 574 | /// are valid. |
| 575 | ///@{ |
| 576 | #define EFI_BUS_CHECK_TRANSACTION_TYPE_VALID BIT0 |
| 577 | #define EFI_BUS_CHECK_OPERATION_VALID BIT1 |
| 578 | #define EFI_BUS_CHECK_LEVEL_VALID BIT2 |
| 579 | #define EFI_BUS_CHECK_CONTEXT_CORRUPT_VALID BIT3 |
| 580 | #define EFI_BUS_CHECK_UNCORRECTED_VALID BIT4 |
| 581 | #define EFI_BUS_CHECK_PRECISE_IP_VALID BIT5 |
| 582 | #define EFI_BUS_CHECK_RESTARTABLE_VALID BIT6 |
| 583 | #define EFI_BUS_CHECK_OVERFLOW_VALID BIT7 |
| 584 | #define EFI_BUS_CHECK_PARTICIPATION_TYPE_VALID BIT8 |
| 585 | #define EFI_BUS_CHECK_TIME_OUT_VALID BIT9 |
| 586 | #define EFI_BUS_CHECK_ADDRESS_SPACE_VALID BIT10 |
| 587 | ///@} |
| 588 | |
| 589 | /// |
| 590 | /// Type of cache error in the Bus Check structure |
| 591 | ///@{ |
| 592 | #define EFI_BUS_CHECK_ERROR_TYPE_INSTRUCTION 0 |
| 593 | #define EFI_BUS_CHECK_ERROR_TYPE_DATA_ACCESS 1 |
| 594 | #define EFI_BUS_CHECK_ERROR_TYPE_GENERIC 2 |
| 595 | ///@} |
| 596 | |
| 597 | /// |
| 598 | /// Type of cache operation that caused the error in the Bus |
| 599 | /// Check structure |
| 600 | ///@{ |
| 601 | #define EFI_BUS_CHECK_OPERATION_TYPE_GENERIC 0 |
| 602 | #define EFI_BUS_CHECK_OPERATION_TYPE_GENERIC_READ 1 |
| 603 | #define EFI_BUS_CHECK_OPERATION_TYPE_GENERIC_WRITE 2 |
| 604 | #define EFI_BUS_CHECK_OPERATION_TYPE_DATA_READ 3 |
| 605 | #define EFI_BUS_CHECK_OPERATION_TYPE_DATA_WRITE 4 |
| 606 | #define EFI_BUS_CHECK_OPERATION_TYPE_INST_FETCH 5 |
| 607 | #define EFI_BUS_CHECK_OPERATION_TYPE_PREFETCH 6 |
| 608 | ///@} |
| 609 | |
| 610 | /// |
| 611 | /// Type of Participation |
| 612 | ///@{ |
| 613 | #define EFI_BUS_CHECK_PARTICIPATION_TYPE_REQUEST 0 |
| 614 | #define EFI_BUS_CHECK_PARTICIPATION_TYPE_RESPONDED 1 |
| 615 | #define EFI_BUS_CHECK_PARTICIPATION_TYPE_OBSERVED 2 |
| 616 | #define EFI_BUS_CHECK_PARTICIPATION_TYPE_GENERIC 3 |
| 617 | ///@} |
| 618 | |
| 619 | /// |
| 620 | /// Type of Address Space |
| 621 | ///@{ |
| 622 | #define EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_MEMORY 0 |
| 623 | #define EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_RESERVED 1 |
| 624 | #define EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_IO 2 |
| 625 | #define EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_OTHER 3 |
| 626 | ///@} |
| 627 | |
| 628 | /// |
| 629 | /// IA32/X64 Bus Check Structure |
| 630 | /// |
| 631 | typedef struct { |
| 632 | UINT64 ValidFields : 16; |
| 633 | UINT64 TransactionType : 2; |
| 634 | UINT64 Operation : 4; |
| 635 | UINT64 Level : 3; |
| 636 | UINT64 ContextCorrupt : 1; |
| 637 | UINT64 ErrorUncorrected : 1; |
| 638 | UINT64 PreciseIp : 1; |
| 639 | UINT64 RestartableIp : 1; |
| 640 | UINT64 Overflow : 1; |
| 641 | UINT64 ParticipationType : 2; |
| 642 | UINT64 TimeOut : 1; |
| 643 | UINT64 AddressSpace : 2; |
| 644 | UINT64 Resv1 : 29; |
| 645 | } EFI_IA32_X64_BUS_CHECK_INFO; |
| 646 | |
| 647 | /// |
| 648 | /// The validation bit mask indicates which fields in the MS Check structure |
| 649 | /// are valid. |
| 650 | ///@{ |
| 651 | #define EFI_MS_CHECK_ERROR_TYPE_VALID BIT0 |
| 652 | #define EFI_MS_CHECK_CONTEXT_CORRUPT_VALID BIT1 |
| 653 | #define EFI_MS_CHECK_UNCORRECTED_VALID BIT2 |
| 654 | #define EFI_MS_CHECK_PRECISE_IP_VALID BIT3 |
| 655 | #define EFI_MS_CHECK_RESTARTABLE_VALID BIT4 |
| 656 | #define EFI_MS_CHECK_OVERFLOW_VALID BIT5 |
| 657 | ///@} |
| 658 | |
| 659 | /// |
| 660 | /// Error type identifies the operation that caused the error. |
| 661 | ///@{ |
| 662 | #define EFI_MS_CHECK_ERROR_TYPE_NO 0 |
| 663 | #define EFI_MS_CHECK_ERROR_TYPE_UNCLASSIFIED 1 |
| 664 | #define EFI_MS_CHECK_ERROR_TYPE_MICROCODE_PARITY 2 |
| 665 | #define EFI_MS_CHECK_ERROR_TYPE_EXTERNAL 3 |
| 666 | #define EFI_MS_CHECK_ERROR_TYPE_FRC 4 |
| 667 | #define EFI_MS_CHECK_ERROR_TYPE_INTERNAL_UNCLASSIFIED 5 |
| 668 | ///@} |
| 669 | |
| 670 | /// |
| 671 | /// IA32/X64 MS Check Field Description |
| 672 | /// |
| 673 | typedef struct { |
| 674 | UINT64 ValidFields : 16; |
| 675 | UINT64 ErrorType : 3; |
| 676 | UINT64 ContextCorrupt : 1; |
| 677 | UINT64 ErrorUncorrected : 1; |
| 678 | UINT64 PreciseIp : 1; |
| 679 | UINT64 RestartableIp : 1; |
| 680 | UINT64 Overflow : 1; |
| 681 | UINT64 Resv1 : 40; |
| 682 | } EFI_IA32_X64_MS_CHECK_INFO; |
| 683 | |
| 684 | /// |
| 685 | /// IA32/X64 Check Information Item |
| 686 | /// |
| 687 | typedef union { |
| 688 | EFI_IA32_X64_CACHE_CHECK_INFO CacheCheck; |
| 689 | EFI_IA32_X64_TLB_CHECK_INFO TlbCheck; |
| 690 | EFI_IA32_X64_BUS_CHECK_INFO BusCheck; |
| 691 | EFI_IA32_X64_MS_CHECK_INFO MsCheck; |
| 692 | UINT64 Data64; |
| 693 | } EFI_IA32_X64_CHECK_INFO_ITEM; |
| 694 | |
| 695 | /// |
| 696 | /// The validation bit mask indicates which fields in the IA32/X64 Processor Error |
| 697 | /// Information Structure are valid. |
| 698 | ///@{ |
| 699 | #define EFI_IA32_X64_ERROR_PROC_CHECK_INFO_VALID BIT0 |
| 700 | #define EFI_IA32_X64_ERROR_PROC_TARGET_ADDR_VALID BIT1 |
| 701 | #define EFI_IA32_X64_ERROR_PROC_REQUESTER_ID_VALID BIT2 |
| 702 | #define EFI_IA32_X64_ERROR_PROC_RESPONDER_ID_VALID BIT3 |
| 703 | #define EFI_IA32_X64_ERROR_PROC_INST_IP_VALID BIT4 |
| 704 | ///@} |
| 705 | |
| 706 | /// |
| 707 | /// IA32/X64 Processor Error Information Structure |
| 708 | /// |
| 709 | typedef struct { |
| 710 | EFI_GUID ErrorType; |
| 711 | UINT64 ValidFields; |
| 712 | EFI_IA32_X64_CHECK_INFO_ITEM CheckInfo; |
| 713 | UINT64 TargetId; |
| 714 | UINT64 RequestorId; |
| 715 | UINT64 ResponderId; |
| 716 | UINT64 InstructionIP; |
| 717 | } EFI_IA32_X64_PROCESS_ERROR_INFO; |
| 718 | |
| 719 | /// |
| 720 | /// IA32/X64 Processor Context Information Structure |
| 721 | /// |
| 722 | typedef struct { |
| 723 | UINT16 RegisterType; |
| 724 | UINT16 ArraySize; |
| 725 | UINT32 MsrAddress; |
| 726 | UINT64 MmRegisterAddress; |
| 727 | // |
| 728 | // This field will provide the contents of the actual registers or raw data. |
| 729 | // The number of Registers or size of the raw data reported is determined |
| 730 | // by (Array Size / 8) or otherwise specified by the context structure type |
| 731 | // definition. |
| 732 | // |
| 733 | } EFI_IA32_X64_PROCESSOR_CONTEXT_INFO; |
| 734 | |
| 735 | /// |
| 736 | /// Register Context Type |
| 737 | ///@{ |
| 738 | #define EFI_REG_CONTEXT_TYPE_UNCLASSIFIED 0x0000 |
| 739 | #define EFI_REG_CONTEXT_TYPE_MSR 0x0001 |
| 740 | #define EFI_REG_CONTEXT_TYPE_IA32 0x0002 |
| 741 | #define EFI_REG_CONTEXT_TYPE_X64 0x0003 |
| 742 | #define EFI_REG_CONTEXT_TYPE_FXSAVE 0x0004 |
| 743 | #define EFI_REG_CONTEXT_TYPE_DR_IA32 0x0005 |
| 744 | #define EFI_REG_CONTEXT_TYPE_DR_X64 0x0006 |
| 745 | #define EFI_REG_CONTEXT_TYPE_MEM_MAP 0x0007 |
| 746 | ///@} |
| 747 | |
| 748 | /// |
| 749 | /// IA32 Register State |
| 750 | /// |
| 751 | typedef struct { |
| 752 | UINT32 Eax; |
| 753 | UINT32 Ebx; |
| 754 | UINT32 Ecx; |
| 755 | UINT32 Edx; |
| 756 | UINT32 Esi; |
| 757 | UINT32 Edi; |
| 758 | UINT32 Ebp; |
| 759 | UINT32 Esp; |
| 760 | UINT16 Cs; |
| 761 | UINT16 Ds; |
| 762 | UINT16 Ss; |
| 763 | UINT16 Es; |
| 764 | UINT16 Fs; |
| 765 | UINT16 Gs; |
| 766 | UINT32 Eflags; |
| 767 | UINT32 Eip; |
| 768 | UINT32 Cr0; |
| 769 | UINT32 Cr1; |
| 770 | UINT32 Cr2; |
| 771 | UINT32 Cr3; |
| 772 | UINT32 Cr4; |
| 773 | UINT32 Gdtr[2]; |
| 774 | UINT32 Idtr[2]; |
| 775 | UINT16 Ldtr; |
| 776 | UINT16 Tr; |
| 777 | } EFI_CONTEXT_IA32_REGISTER_STATE; |
| 778 | |
| 779 | /// |
| 780 | /// X64 Register State |
| 781 | /// |
| 782 | typedef struct { |
| 783 | UINT64 Rax; |
| 784 | UINT64 Rbx; |
| 785 | UINT64 Rcx; |
| 786 | UINT64 Rdx; |
| 787 | UINT64 Rsi; |
| 788 | UINT64 Rdi; |
| 789 | UINT64 Rbp; |
| 790 | UINT64 Rsp; |
| 791 | UINT64 R8; |
| 792 | UINT64 R9; |
| 793 | UINT64 R10; |
| 794 | UINT64 R11; |
| 795 | UINT64 R12; |
| 796 | UINT64 R13; |
| 797 | UINT64 R14; |
| 798 | UINT64 R15; |
| 799 | UINT16 Cs; |
| 800 | UINT16 Ds; |
| 801 | UINT16 Ss; |
| 802 | UINT16 Es; |
| 803 | UINT16 Fs; |
| 804 | UINT16 Gs; |
| 805 | UINT32 Resv1; |
| 806 | UINT64 Rflags; |
| 807 | UINT64 Rip; |
| 808 | UINT64 Cr0; |
| 809 | UINT64 Cr1; |
| 810 | UINT64 Cr2; |
| 811 | UINT64 Cr3; |
| 812 | UINT64 Cr4; |
| 813 | UINT64 Cr8; |
| 814 | UINT64 Gdtr[2]; |
| 815 | UINT64 Idtr[2]; |
| 816 | UINT16 Ldtr; |
| 817 | UINT16 Tr; |
| 818 | } EFI_CONTEXT_X64_REGISTER_STATE; |
| 819 | |
| 820 | /// |
| 821 | /// The validation bit mask indicates each of the following field is in IA32/X64 |
| 822 | /// Processor Error Section. |
| 823 | /// |
| 824 | typedef struct { |
| 825 | UINT64 ApicIdValid : 1; |
| 826 | UINT64 CpuIdInforValid : 1; |
| 827 | UINT64 ErrorInfoNum : 6; |
| 828 | UINT64 ContextNum : 6; |
| 829 | UINT64 Resv1 : 50; |
| 830 | } EFI_IA32_X64_VALID_BITS; |
| 831 | |
| 832 | /// |
| 833 | /// Error Status Fields |
| 834 | /// |
| 835 | typedef struct { |
| 836 | UINT64 Resv1 : 8; |
| 837 | UINT64 Type : 8; |
| 838 | UINT64 AddressSignal : 1; ///< Error in Address signals or in Address portion of transaction |
| 839 | UINT64 ControlSignal : 1; ///< Error in Control signals or in Control portion of transaction |
| 840 | UINT64 DataSignal : 1; ///< Error in Data signals or in Data portion of transaction |
| 841 | UINT64 DetectedByResponder : 1; ///< Error detected by responder |
| 842 | UINT64 DetectedByRequester : 1; ///< Error detected by requestor |
| 843 | UINT64 FirstError : 1; ///< First Error in the sequence - option field |
| 844 | UINT64 OverflowNotLogged : 1; ///< Additional errors were not logged due to lack of resources |
| 845 | UINT64 Resv2 : 41; |
| 846 | } EFI_GENERIC_ERROR_STATUS; |
| 847 | |
| 848 | /// |
| 849 | /// CPER Generic Error Codes |
| 850 | /// |
| 851 | #define CPER_GENERIC_ERROR_TYPES_KEYS \ |
| 852 | (int[]) \ |
| 853 | { \ |
| 854 | 1, 16, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25, \ |
| 855 | 26 \ |
| 856 | } |
| 857 | #define CPER_GENERIC_ERROR_TYPES_VALUES \ |
| 858 | (const char *[]) \ |
| 859 | { \ |
| 860 | "ERR_INTERNAL", "ERR_BUS", "ERR_MEM", "ERR_TLB", "ERR_CACHE", \ |
| 861 | "ERR_FUNCTION", "ERR_SELFTEST", "ERR_FLOW", "ERR_MAP", \ |
| 862 | "ERR_IMPROPER", "ERR_UNIMPL", "ERR_LOL", \ |
| 863 | "ERR_RESPONSE", "ERR_PARITY", "ERR_PROTOCOL", \ |
| 864 | "ERR_ERROR", "ERR_TIMEOUT", "ERR_POISONED" \ |
| 865 | } |
| 866 | #define CPER_GENERIC_ERROR_TYPES_DESCRIPTIONS \ |
| 867 | (const char *[]) \ |
| 868 | { \ |
| 869 | "Error detected internal to the component.", \ |
| 870 | "Error detected in the bus.", \ |
| 871 | "Storage error in memory (DRAM).", \ |
| 872 | "Storage error in TLB.", "Storage error in cache.", \ |
| 873 | "Error in one or more functional units.", \ |
| 874 | "Component failed self test.", \ |
| 875 | "Overflow or underflow of internal queue.", \ |
| 876 | "Virtual address not found on IO-TLB or IO-PDIR.", \ |
| 877 | "Improper access error.", \ |
| 878 | "Access to a memory address which is not mapped to any component.", \ |
| 879 | "Loss of Lockstep error.", \ |
| 880 | "Response not associated with a request.", \ |
| 881 | "Bus parity error (must also set the A, C, or D bits).", \ |
| 882 | "Detection of a protocol error.", \ |
| 883 | "Detection of a PATH_ERROR.", \ |
| 884 | "Bus operation timeout.", \ |
| 885 | "A read was issued to data that has been poisoned." \ |
| 886 | } |
| 887 | |
| 888 | /// |
| 889 | /// Error Type |
| 890 | /// |
| 891 | typedef enum { |
| 892 | /// |
| 893 | /// General Internal errors |
| 894 | /// |
| 895 | ErrorInternal = 1, |
| 896 | ErrorBus = 16, |
| 897 | /// |
| 898 | /// Component Internal errors |
| 899 | /// |
| 900 | ErrorMemStorage = 4, // Error in memory device |
| 901 | ErrorTlbStorage = 5, // TLB error in cache |
| 902 | ErrorCacheStorage = 6, |
| 903 | ErrorFunctionalUnit = 7, |
| 904 | ErrorSelftest = 8, |
| 905 | ErrorOverflow = 9, |
| 906 | /// |
| 907 | /// Bus internal errors |
| 908 | /// |
| 909 | ErrorVirtualMap = 17, |
| 910 | ErrorAccessInvalid = 18, // Improper access |
| 911 | ErrorUnimplAccess = 19, // Unimplemented memory access |
| 912 | ErrorLossOfLockstep = 20, |
| 913 | ErrorResponseInvalid = 21, // Response not associated with request |
| 914 | ErrorParity = 22, |
| 915 | ErrorProtocol = 23, |
| 916 | ErrorPath = 24, // Detected path error |
| 917 | ErrorTimeout = 25, // Bus timeout |
| 918 | ErrorPoisoned = 26 // Read data poisoned |
| 919 | } EFI_GENERIC_ERROR_STATUS_ERROR_TYPE; |
| 920 | |
| 921 | /// |
| 922 | /// Validation bit mask indicates which fields in the memory error record are valid |
| 923 | /// in Memory Error section |
| 924 | ///@{ |
| 925 | #define EFI_PLATFORM_MEMORY_ERROR_STATUS_VALID BIT0 |
| 926 | #define EFI_PLATFORM_MEMORY_PHY_ADDRESS_VALID BIT1 |
| 927 | #define EFI_PLATFORM_MEMORY_PHY_ADDRESS_MASK_VALID BIT2 |
| 928 | #define EFI_PLATFORM_MEMORY_NODE_VALID BIT3 |
| 929 | #define EFI_PLATFORM_MEMORY_CARD_VALID BIT4 |
| 930 | #define EFI_PLATFORM_MEMORY_MODULE_VALID BIT5 |
| 931 | #define EFI_PLATFORM_MEMORY_BANK_VALID BIT6 |
| 932 | #define EFI_PLATFORM_MEMORY_DEVICE_VALID BIT7 |
| 933 | #define EFI_PLATFORM_MEMORY_ROW_VALID BIT8 |
| 934 | #define EFI_PLATFORM_MEMORY_COLUMN_VALID BIT9 |
| 935 | #define EFI_PLATFORM_MEMORY_BIT_POS_VALID BIT10 |
| 936 | #define EFI_PLATFORM_MEMORY_REQUESTOR_ID_VALID BIT11 |
| 937 | #define EFI_PLATFORM_MEMORY_RESPONDER_ID_VALID BIT12 |
| 938 | #define EFI_PLATFORM_MEMORY_TARGET_ID_VALID BIT13 |
| 939 | #define EFI_PLATFORM_MEMORY_ERROR_TYPE_VALID BIT14 |
| 940 | #define EFI_PLATFORM_MEMORY_ERROR_RANK_NUM_VALID BIT15 |
| 941 | #define EFI_PLATFORM_MEMORY_ERROR_CARD_HANDLE_VALID BIT16 |
| 942 | #define EFI_PLATFORM_MEMORY_ERROR_MODULE_HANDLE_VALID BIT17 |
| 943 | #define EFI_PLATFORM_MEMORY_ERROR_EXTENDED_ROW_BIT_16_17_VALID BIT18 |
| 944 | #define EFI_PLATFORM_MEMORY_ERROR_BANK_GROUP_VALID BIT19 |
| 945 | #define EFI_PLATFORM_MEMORY_ERROR_BANK_ADDRESS_VALID BIT20 |
| 946 | #define EFI_PLATFORM_MEMORY_ERROR_CHIP_IDENTIFICATION_VALID BIT21 |
| 947 | ///@} |
| 948 | |
| 949 | /// |
| 950 | /// Memory Error Type identifies the type of error that occurred in Memory |
| 951 | /// Error section |
| 952 | ///@{ |
| 953 | #define EFI_PLATFORM_MEMORY_ERROR_UNKNOWN 0x00 |
| 954 | #define EFI_PLATFORM_MEMORY_ERROR_NONE 0x01 |
| 955 | #define EFI_PLATFORM_MEMORY_ERROR_SINGLEBIT_ECC 0x02 |
| 956 | #define EFI_PLATFORM_MEMORY_ERROR_MLTIBIT_ECC 0x03 |
| 957 | #define EFI_PLATFORM_MEMORY_ERROR_SINGLESYMBOLS_CHIPKILL 0x04 |
| 958 | #define EFI_PLATFORM_MEMORY_ERROR_MULTISYMBOL_CHIPKILL 0x05 |
| 959 | #define EFI_PLATFORM_MEMORY_ERROR_MATER_ABORT 0x06 |
| 960 | #define EFI_PLATFORM_MEMORY_ERROR_TARGET_ABORT 0x07 |
| 961 | #define EFI_PLATFORM_MEMORY_ERROR_PARITY 0x08 |
| 962 | #define EFI_PLATFORM_MEMORY_ERROR_WDT 0x09 |
| 963 | #define EFI_PLATFORM_MEMORY_ERROR_INVALID_ADDRESS 0x0A |
| 964 | #define EFI_PLATFORM_MEMORY_ERROR_MIRROR_FAILED 0x0B |
| 965 | #define EFI_PLATFORM_MEMORY_ERROR_SPARING 0x0C |
| 966 | #define EFI_PLATFORM_MEMORY_ERROR_SCRUB_CORRECTED 0x0D |
| 967 | #define EFI_PLATFORM_MEMORY_ERROR_SCRUB_UNCORRECTED 0x0E |
| 968 | #define EFI_PLATFORM_MEMORY_ERROR_MEMORY_MAP_EVENT 0x0F |
| 969 | ///@} |
| 970 | |
| 971 | /// |
| 972 | /// Memory Error Section |
| 973 | /// |
| 974 | typedef struct { |
| 975 | UINT64 ValidFields; |
| 976 | EFI_GENERIC_ERROR_STATUS ErrorStatus; |
| 977 | UINT64 PhysicalAddress; // Error physical address |
| 978 | UINT64 PhysicalAddressMask; // Grnaularity |
| 979 | UINT16 Node; // Node # |
| 980 | UINT16 Card; |
| 981 | UINT16 ModuleRank; // Module or Rank# |
| 982 | UINT16 Bank; |
| 983 | UINT16 Device; |
| 984 | UINT16 Row; |
| 985 | UINT16 Column; |
| 986 | UINT16 BitPosition; |
| 987 | UINT64 RequestorId; |
| 988 | UINT64 ResponderId; |
| 989 | UINT64 TargetId; |
| 990 | UINT8 ErrorType; |
| 991 | UINT8 Extended; |
| 992 | UINT16 RankNum; |
| 993 | UINT16 CardHandle; |
| 994 | UINT16 ModuleHandle; |
| 995 | } EFI_PLATFORM_MEMORY_ERROR_DATA; |
| 996 | |
| 997 | /// |
| 998 | /// Validation bit mask indicates which fields in the memory error record 2 are valid |
| 999 | /// in Memory Error section 2 |
| 1000 | ///@{ |
| 1001 | #define EFI_PLATFORM_MEMORY2_ERROR_STATUS_VALID BIT0 |
| 1002 | #define EFI_PLATFORM_MEMORY2_PHY_ADDRESS_VALID BIT1 |
| 1003 | #define EFI_PLATFORM_MEMORY2_PHY_ADDRESS_MASK_VALID BIT2 |
| 1004 | #define EFI_PLATFORM_MEMORY2_NODE_VALID BIT3 |
| 1005 | #define EFI_PLATFORM_MEMORY2_CARD_VALID BIT4 |
| 1006 | #define EFI_PLATFORM_MEMORY2_MODULE_VALID BIT5 |
| 1007 | #define EFI_PLATFORM_MEMORY2_BANK_VALID BIT6 |
| 1008 | #define EFI_PLATFORM_MEMORY2_DEVICE_VALID BIT7 |
| 1009 | #define EFI_PLATFORM_MEMORY2_ROW_VALID BIT8 |
| 1010 | #define EFI_PLATFORM_MEMORY2_COLUMN_VALID BIT9 |
| 1011 | #define EFI_PLATFORM_MEMORY2_RANK_VALID BIT10 |
| 1012 | #define EFI_PLATFORM_MEMORY2_BIT_POS_VALID BIT11 |
| 1013 | #define EFI_PLATFORM_MEMORY2_CHIP_ID_VALID BIT12 |
| 1014 | #define EFI_PLATFORM_MEMORY2_MEMORY_ERROR_TYPE_VALID BIT13 |
| 1015 | #define EFI_PLATFORM_MEMORY2_STATUS_VALID BIT14 |
| 1016 | #define EFI_PLATFORM_MEMORY2_REQUESTOR_ID_VALID BIT15 |
| 1017 | #define EFI_PLATFORM_MEMORY2_RESPONDER_ID_VALID BIT16 |
| 1018 | #define EFI_PLATFORM_MEMORY2_TARGET_ID_VALID BIT17 |
| 1019 | #define EFI_PLATFORM_MEMORY2_CARD_HANDLE_VALID BIT18 |
| 1020 | #define EFI_PLATFORM_MEMORY2_MODULE_HANDLE_VALID BIT19 |
| 1021 | #define EFI_PLATFORM_MEMORY2_BANK_GROUP_VALID BIT20 |
| 1022 | #define EFI_PLATFORM_MEMORY2_BANK_ADDRESS_VALID BIT21 |
| 1023 | ///@} |
| 1024 | |
| 1025 | /// |
| 1026 | /// Memory Error Type identifies the type of error that occurred in Memory |
| 1027 | /// Error section 2 |
| 1028 | ///@{ |
| 1029 | #define EFI_PLATFORM_MEMORY2_ERROR_UNKNOWN 0x00 |
| 1030 | #define EFI_PLATFORM_MEMORY2_ERROR_NONE 0x01 |
| 1031 | #define EFI_PLATFORM_MEMORY2_ERROR_SINGLEBIT_ECC 0x02 |
| 1032 | #define EFI_PLATFORM_MEMORY2_ERROR_MLTIBIT_ECC 0x03 |
| 1033 | #define EFI_PLATFORM_MEMORY2_ERROR_SINGLESYMBOL_CHIPKILL 0x04 |
| 1034 | #define EFI_PLATFORM_MEMORY2_ERROR_MULTISYMBOL_CHIPKILL 0x05 |
| 1035 | #define EFI_PLATFORM_MEMORY2_ERROR_MASTER_ABORT 0x06 |
| 1036 | #define EFI_PLATFORM_MEMORY2_ERROR_TARGET_ABORT 0x07 |
| 1037 | #define EFI_PLATFORM_MEMORY2_ERROR_PARITY 0x08 |
| 1038 | #define EFI_PLATFORM_MEMORY2_ERROR_WDT 0x09 |
| 1039 | #define EFI_PLATFORM_MEMORY2_ERROR_INVALID_ADDRESS 0x0A |
| 1040 | #define EFI_PLATFORM_MEMORY2_ERROR_MIRROR_BROKEN 0x0B |
| 1041 | #define EFI_PLATFORM_MEMORY2_ERROR_MEMORY_SPARING 0x0C |
| 1042 | #define EFI_PLATFORM_MEMORY2_ERROR_SCRUB_CORRECTED 0x0D |
| 1043 | #define EFI_PLATFORM_MEMORY2_ERROR_SCRUB_UNCORRECTED 0x0E |
| 1044 | #define EFI_PLATFORM_MEMORY2_ERROR_MEMORY_MAP_EVENT 0x0F |
| 1045 | ///@} |
| 1046 | |
| 1047 | /// |
| 1048 | /// Memory Error Section 2 |
| 1049 | /// |
| 1050 | typedef struct { |
| 1051 | UINT64 ValidFields; |
| 1052 | EFI_GENERIC_ERROR_STATUS ErrorStatus; |
| 1053 | UINT64 PhysicalAddress; // Error physical address |
| 1054 | UINT64 PhysicalAddressMask; // Grnaularity |
| 1055 | UINT16 Node; // Node # |
| 1056 | UINT16 Card; |
| 1057 | UINT16 Module; // Module or Rank# |
| 1058 | UINT16 Bank; |
| 1059 | UINT32 Device; |
| 1060 | UINT32 Row; |
| 1061 | UINT32 Column; |
| 1062 | UINT32 Rank; |
| 1063 | UINT32 BitPosition; |
| 1064 | UINT8 ChipId; |
| 1065 | UINT8 MemErrorType; |
| 1066 | UINT8 Status; |
| 1067 | UINT8 Reserved; |
| 1068 | UINT64 RequestorId; |
| 1069 | UINT64 ResponderId; |
| 1070 | UINT64 TargetId; |
| 1071 | UINT32 CardHandle; |
| 1072 | UINT32 ModuleHandle; |
| 1073 | } EFI_PLATFORM_MEMORY2_ERROR_DATA; |
| 1074 | |
| 1075 | /// |
| 1076 | /// Validation bits mask indicates which of the following fields is valid |
| 1077 | /// in PCI Express Error Record. |
| 1078 | ///@{ |
| 1079 | #define EFI_PCIE_ERROR_PORT_TYPE_VALID BIT0 |
| 1080 | #define EFI_PCIE_ERROR_VERSION_VALID BIT1 |
| 1081 | #define EFI_PCIE_ERROR_COMMAND_STATUS_VALID BIT2 |
| 1082 | #define EFI_PCIE_ERROR_DEVICE_ID_VALID BIT3 |
| 1083 | #define EFI_PCIE_ERROR_SERIAL_NO_VALID BIT4 |
| 1084 | #define EFI_PCIE_ERROR_BRIDGE_CRL_STS_VALID BIT5 |
| 1085 | #define EFI_PCIE_ERROR_CAPABILITY_INFO_VALID BIT6 |
| 1086 | #define EFI_PCIE_ERROR_AER_INFO_VALID BIT7 |
| 1087 | ///@} |
| 1088 | |
| 1089 | /// |
| 1090 | /// PCIe Device/Port Type as defined in the PCI Express capabilities register |
| 1091 | ///@{ |
| 1092 | #define EFI_PCIE_ERROR_PORT_PCIE_ENDPOINT 0x00000000 |
| 1093 | #define EFI_PCIE_ERROR_PORT_PCI_ENDPOINT 0x00000001 |
| 1094 | #define EFI_PCIE_ERROR_PORT_ROOT_PORT 0x00000004 |
| 1095 | #define EFI_PCIE_ERROR_PORT_UPSWITCH_PORT 0x00000005 |
| 1096 | #define EFI_PCIE_ERROR_PORT_DOWNSWITCH_PORT 0x00000006 |
| 1097 | #define EFI_PCIE_ERROR_PORT_PCIE_TO_PCI_BRIDGE 0x00000007 |
| 1098 | #define EFI_PCIE_ERROR_PORT_PCI_TO_PCIE_BRIDGE 0x00000008 |
| 1099 | #define EFI_PCIE_ERROR_PORT_ROOT_INT_ENDPOINT 0x00000009 |
| 1100 | #define EFI_PCIE_ERROR_PORT_ROOT_EVENT_COLLECTOR 0x0000000A |
| 1101 | ///@} |
| 1102 | |
| 1103 | /// |
| 1104 | /// PCI Slot number |
| 1105 | /// |
| 1106 | typedef struct { |
| 1107 | UINT16 Resv1 : 3; |
| 1108 | UINT16 Number : 13; |
| 1109 | } EFI_GENERIC_ERROR_PCI_SLOT; |
| 1110 | |
| 1111 | /// |
| 1112 | /// PCIe Root Port PCI/bridge PCI compatible device number and |
| 1113 | /// bus number information to uniquely identify the root port or |
| 1114 | /// bridge. Default values for both the bus numbers is zero. |
| 1115 | /// |
| 1116 | typedef struct { |
| 1117 | UINT16 VendorId; |
| 1118 | UINT16 DeviceId; |
| 1119 | UINT8 ClassCode[3]; |
| 1120 | UINT8 Function; |
| 1121 | UINT8 Device; |
| 1122 | UINT16 Segment; |
| 1123 | UINT8 PrimaryOrDeviceBus; |
| 1124 | UINT8 SecondaryBus; |
| 1125 | EFI_GENERIC_ERROR_PCI_SLOT Slot; |
| 1126 | UINT8 Resv1; |
| 1127 | } EFI_GENERIC_ERROR_PCIE_DEV_BRIDGE_ID; |
| 1128 | |
| 1129 | /// |
| 1130 | /// PCIe Capability Structure |
| 1131 | /// |
| 1132 | typedef struct { |
| 1133 | UINT8 PcieCap[60]; |
| 1134 | } EFI_PCIE_ERROR_DATA_CAPABILITY; |
| 1135 | |
| 1136 | /// |
| 1137 | /// PCIe Advanced Error Reporting Extended Capability Structure. |
| 1138 | /// |
| 1139 | typedef struct { |
| 1140 | UINT8 PcieAer[96]; |
| 1141 | } EFI_PCIE_ERROR_DATA_AER; |
| 1142 | |
| 1143 | /// |
| 1144 | /// PCI Express Error Record |
| 1145 | /// |
| 1146 | typedef struct { |
| 1147 | UINT64 ValidFields; |
| 1148 | UINT32 PortType; |
| 1149 | UINT32 Version; |
| 1150 | UINT32 CommandStatus; |
| 1151 | UINT32 Resv2; |
| 1152 | EFI_GENERIC_ERROR_PCIE_DEV_BRIDGE_ID DevBridge; |
| 1153 | UINT64 SerialNo; |
| 1154 | UINT32 BridgeControlStatus; |
| 1155 | EFI_PCIE_ERROR_DATA_CAPABILITY Capability; |
| 1156 | EFI_PCIE_ERROR_DATA_AER AerInfo; |
| 1157 | } EFI_PCIE_ERROR_DATA; |
| 1158 | |
| 1159 | /// |
| 1160 | /// Validation bits Indicates which of the following fields is valid |
| 1161 | /// in PCI/PCI-X Bus Error Section. |
| 1162 | ///@{ |
| 1163 | #define EFI_PCI_PCIX_BUS_ERROR_STATUS_VALID BIT0 |
| 1164 | #define EFI_PCI_PCIX_BUS_ERROR_TYPE_VALID BIT1 |
| 1165 | #define EFI_PCI_PCIX_BUS_ERROR_BUS_ID_VALID BIT2 |
| 1166 | #define EFI_PCI_PCIX_BUS_ERROR_BUS_ADDRESS_VALID BIT3 |
| 1167 | #define EFI_PCI_PCIX_BUS_ERROR_BUS_DATA_VALID BIT4 |
| 1168 | #define EFI_PCI_PCIX_BUS_ERROR_COMMAND_VALID BIT5 |
| 1169 | #define EFI_PCI_PCIX_BUS_ERROR_REQUESTOR_ID_VALID BIT6 |
| 1170 | #define EFI_PCI_PCIX_BUS_ERROR_COMPLETER_ID_VALID BIT7 |
| 1171 | #define EFI_PCI_PCIX_BUS_ERROR_TARGET_ID_VALID BIT8 |
| 1172 | ///@} |
| 1173 | |
| 1174 | /// |
| 1175 | /// PCI Bus Error Type in PCI/PCI-X Bus Error Section |
| 1176 | ///@{ |
| 1177 | #define EFI_PCI_PCIX_BUS_ERROR_UNKNOWN 0x0000 |
| 1178 | #define EFI_PCI_PCIX_BUS_ERROR_DATA_PARITY 0x0001 |
| 1179 | #define EFI_PCI_PCIX_BUS_ERROR_SYSTEM 0x0002 |
| 1180 | #define EFI_PCI_PCIX_BUS_ERROR_MASTER_ABORT 0x0003 |
| 1181 | #define EFI_PCI_PCIX_BUS_ERROR_BUS_TIMEOUT 0x0004 |
| 1182 | #define EFI_PCI_PCIX_BUS_ERROR_MASTER_DATA_PARITY 0x0005 |
| 1183 | #define EFI_PCI_PCIX_BUS_ERROR_ADDRESS_PARITY 0x0006 |
| 1184 | #define EFI_PCI_PCIX_BUS_ERROR_COMMAND_PARITY 0x0007 |
| 1185 | ///@} |
| 1186 | |
| 1187 | /// |
| 1188 | /// PCI/PCI-X Bus Error Section |
| 1189 | /// |
| 1190 | typedef struct { |
| 1191 | UINT64 ValidFields; |
| 1192 | EFI_GENERIC_ERROR_STATUS ErrorStatus; |
| 1193 | UINT16 Type; |
| 1194 | UINT16 BusId; |
| 1195 | UINT32 Resv2; |
| 1196 | UINT64 BusAddress; |
| 1197 | UINT64 BusData; |
| 1198 | UINT64 BusCommand; |
| 1199 | UINT64 RequestorId; |
| 1200 | UINT64 ResponderId; |
| 1201 | UINT64 TargetId; |
| 1202 | } EFI_PCI_PCIX_BUS_ERROR_DATA; |
| 1203 | |
| 1204 | /// |
| 1205 | /// Validation bits Indicates which of the following fields is valid |
| 1206 | /// in PCI/PCI-X Component Error Section. |
| 1207 | ///@{ |
| 1208 | #define EFI_PCI_PCIX_DEVICE_ERROR_STATUS_VALID BIT0 |
| 1209 | #define EFI_PCI_PCIX_DEVICE_ERROR_ID_INFO_VALID BIT1 |
| 1210 | #define EFI_PCI_PCIX_DEVICE_ERROR_MEM_NUM_VALID BIT2 |
| 1211 | #define EFI_PCI_PCIX_DEVICE_ERROR_IO_NUM_VALID BIT3 |
| 1212 | #define EFI_PCI_PCIX_DEVICE_ERROR_REG_DATA_PAIR_VALID BIT4 |
| 1213 | ///@} |
| 1214 | |
| 1215 | /// |
| 1216 | /// PCI/PCI-X Device Identification Information |
| 1217 | /// |
| 1218 | typedef struct { |
| 1219 | UINT16 VendorId; |
| 1220 | UINT16 DeviceId; |
| 1221 | UINT8 ClassCode[3]; |
| 1222 | UINT8 Function; |
| 1223 | UINT8 Device; |
| 1224 | UINT8 Bus; |
| 1225 | UINT8 Segment; |
| 1226 | UINT8 Resv1; |
| 1227 | UINT32 Resv2; |
| 1228 | } EFI_GENERIC_ERROR_PCI_DEVICE_ID; |
| 1229 | |
| 1230 | /// |
| 1231 | /// Identifies the type of firmware error record |
| 1232 | ///@{ |
| 1233 | #define EFI_FIRMWARE_ERROR_TYPE_IPF_SAL 0x00 |
| 1234 | #define EFI_FIRMWARE_ERROR_TYPE_SOC_TYPE1 0x01 |
| 1235 | #define EFI_FIRMWARE_ERROR_TYPE_SOC_TYPE2 0x02 |
| 1236 | ///@} |
| 1237 | |
| 1238 | /// |
| 1239 | /// Firmware Error Record Section |
| 1240 | /// |
| 1241 | typedef struct { |
| 1242 | UINT8 ErrorType; |
| 1243 | UINT8 Revision; |
| 1244 | UINT8 Resv1[6]; |
| 1245 | UINT64 RecordId; |
| 1246 | EFI_GUID RecordIdGuid; |
| 1247 | } EFI_FIRMWARE_ERROR_DATA; |
| 1248 | |
| 1249 | /// |
| 1250 | /// Fault Reason in DMAr Generic Error Section |
| 1251 | ///@{ |
| 1252 | #define EFI_DMA_FAULT_REASON_TABLE_ENTRY_NOT_PRESENT 0x01 |
| 1253 | #define EFI_DMA_FAULT_REASON_TABLE_ENTRY_INVALID 0x02 |
| 1254 | #define EFI_DMA_FAULT_REASON_ACCESS_MAPPING_TABLE_ERROR 0x03 |
| 1255 | #define EFI_DMA_FAULT_REASON_RESV_BIT_ERROR_IN_MAPPING_TABLE 0x04 |
| 1256 | #define EFI_DMA_FAULT_REASON_ACCESS_ADDR_OUT_OF_SPACE 0x05 |
| 1257 | #define EFI_DMA_FAULT_REASON_INVALID_ACCESS 0x06 |
| 1258 | #define EFI_DMA_FAULT_REASON_INVALID_REQUEST 0x07 |
| 1259 | #define EFI_DMA_FAULT_REASON_ACCESS_TRANSLATE_TABLE_ERROR 0x08 |
| 1260 | #define EFI_DMA_FAULT_REASON_RESV_BIT_ERROR_IN_TRANSLATE_TABLE 0x09 |
| 1261 | #define EFI_DMA_FAULT_REASON_INVALID_COMMAOND 0x0A |
| 1262 | #define EFI_DMA_FAULT_REASON_ACCESS_COMMAND_BUFFER_ERROR 0x0B |
| 1263 | ///@} |
| 1264 | |
| 1265 | /// |
| 1266 | /// DMA access type in DMAr Generic Error Section |
| 1267 | ///@{ |
| 1268 | #define EFI_DMA_ACCESS_TYPE_READ 0x00 |
| 1269 | #define EFI_DMA_ACCESS_TYPE_WRITE 0x01 |
| 1270 | ///@} |
| 1271 | |
| 1272 | /// |
| 1273 | /// DMA address type in DMAr Generic Error Section |
| 1274 | ///@{ |
| 1275 | #define EFI_DMA_ADDRESS_UNTRANSLATED 0x00 |
| 1276 | #define EFI_DMA_ADDRESS_TRANSLATION 0x01 |
| 1277 | ///@} |
| 1278 | |
| 1279 | /// |
| 1280 | /// Architecture type in DMAr Generic Error Section |
| 1281 | ///@{ |
| 1282 | #define EFI_DMA_ARCH_TYPE_VT 0x01 |
| 1283 | #define EFI_DMA_ARCH_TYPE_IOMMU 0x02 |
| 1284 | ///@} |
| 1285 | |
| 1286 | /// |
| 1287 | /// DMAr Generic Error Section |
| 1288 | /// |
| 1289 | typedef struct { |
| 1290 | UINT16 RequesterId; |
| 1291 | UINT16 SegmentNumber; |
| 1292 | UINT8 FaultReason; |
| 1293 | UINT8 AccessType; |
| 1294 | UINT8 AddressType; |
| 1295 | UINT8 ArchType; |
| 1296 | UINT64 DeviceAddr; |
| 1297 | UINT8 Resv1[16]; |
| 1298 | } EFI_DMAR_GENERIC_ERROR_DATA; |
| 1299 | |
| 1300 | /// |
| 1301 | /// Intel VT for Directed I/O specific DMAr Errors |
| 1302 | /// |
| 1303 | typedef struct { |
| 1304 | UINT8 Version; |
| 1305 | UINT8 Revision; |
| 1306 | UINT8 OemId[6]; |
| 1307 | UINT64 Capability; |
| 1308 | UINT64 CapabilityEx; |
| 1309 | UINT32 GlobalCommand; |
| 1310 | UINT32 GlobalStatus; |
| 1311 | UINT32 FaultStatus; |
| 1312 | UINT8 Resv1[12]; |
| 1313 | UINT64 FaultRecord[2]; |
| 1314 | UINT64 RootEntry[2]; |
| 1315 | UINT64 ContextEntry[2]; |
| 1316 | UINT64 PteL6; |
| 1317 | UINT64 PteL5; |
| 1318 | UINT64 PteL4; |
| 1319 | UINT64 PteL3; |
| 1320 | UINT64 PteL2; |
| 1321 | UINT64 PteL1; |
| 1322 | } EFI_DIRECTED_IO_DMAR_ERROR_DATA; |
| 1323 | |
| 1324 | /// |
| 1325 | /// IOMMU specific DMAr Errors |
| 1326 | /// |
| 1327 | typedef struct { |
| 1328 | UINT8 Revision; |
| 1329 | UINT8 Resv1[7]; |
| 1330 | UINT64 Control; |
| 1331 | UINT64 Status; |
| 1332 | UINT8 Resv2[8]; |
| 1333 | UINT64 EventLogEntry[2]; |
| 1334 | UINT8 Resv3[16]; |
| 1335 | UINT64 DeviceTableEntry[4]; |
| 1336 | UINT64 PteL6; |
| 1337 | UINT64 PteL5; |
| 1338 | UINT64 PteL4; |
| 1339 | UINT64 PteL3; |
| 1340 | UINT64 PteL2; |
| 1341 | UINT64 PteL1; |
| 1342 | } EFI_IOMMU_DMAR_ERROR_DATA; |
| 1343 | |
| 1344 | extern EFI_GUID gEfiEventNotificationTypeCmcGuid; |
| 1345 | extern EFI_GUID gEfiEventNotificationTypeCpeGuid; |
| 1346 | extern EFI_GUID gEfiEventNotificationTypeMceGuid; |
| 1347 | extern EFI_GUID gEfiEventNotificationTypePcieGuid; |
| 1348 | extern EFI_GUID gEfiEventNotificationTypeInitGuid; |
| 1349 | extern EFI_GUID gEfiEventNotificationTypeNmiGuid; |
| 1350 | extern EFI_GUID gEfiEventNotificationTypeBootGuid; |
| 1351 | extern EFI_GUID gEfiEventNotificationTypeDmarGuid; |
| 1352 | extern EFI_GUID gEfiEventNotificationTypeSeaGuid; |
| 1353 | extern EFI_GUID gEfiEventNotificationTypeSeiGuid; |
| 1354 | extern EFI_GUID gEfiEventNotificationTypePeiGuid; |
| 1355 | extern EFI_GUID gEfiEventNotificationTypeCxlGuid; |
| 1356 | extern EFI_GUID gEfiProcessorGenericErrorSectionGuid; |
| 1357 | extern EFI_GUID gEfiProcessorSpecificErrorSectionGuid; |
| 1358 | extern EFI_GUID gEfiIa32X64ProcessorErrorSectionGuid; |
| 1359 | extern EFI_GUID gEfiIpfProcessorErrorSectionGuid; |
| 1360 | extern EFI_GUID gEfiArmProcessorErrorSectionGuid; |
| 1361 | extern EFI_GUID gEfiPlatformMemoryErrorSectionGuid; |
| 1362 | extern EFI_GUID gEfiPlatformMemoryError2SectionGuid; |
| 1363 | extern EFI_GUID gEfiPcieErrorSectionGuid; |
| 1364 | extern EFI_GUID gEfiFirmwareErrorSectionGuid; |
| 1365 | extern EFI_GUID gEfiPciBusErrorSectionGuid; |
| 1366 | extern EFI_GUID gEfiPciDevErrorSectionGuid; |
| 1367 | extern EFI_GUID gEfiDMArGenericErrorSectionGuid; |
| 1368 | extern EFI_GUID gEfiDirectedIoDMArErrorSectionGuid; |
| 1369 | extern EFI_GUID gEfiIommuDMArErrorSectionGuid; |
| 1370 | extern EFI_GUID gEfiCcixPerLogErrorSectionGuid; |
| 1371 | extern EFI_GUID gEfiCxlProtocolErrorSectionGuid; |
| 1372 | extern EFI_GUID gEfiCxlGeneralMediaErrorSectionGuid; |
| 1373 | extern EFI_GUID gEfiCxlDramEventErrorSectionGuid; |
| 1374 | extern EFI_GUID gEfiCxlMemoryModuleErrorSectionGuid; |
| 1375 | extern EFI_GUID gEfiCxlPhysicalSwitchErrorSectionGuid; |
| 1376 | extern EFI_GUID gEfiCxlVirtualSwitchErrorSectionGuid; |
| 1377 | extern EFI_GUID gEfiCxlMldPortErrorSectionGuid; |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 1378 | |
| 1379 | #if defined(MDE_CPU_IA32) || defined(MDE_CPU_X64) |
| 1380 | /// |
| 1381 | /// IA32 and x64 Specific definitions. |
| 1382 | /// |
| 1383 | |
| 1384 | extern EFI_GUID gEfiIa32X64ErrorTypeCacheCheckGuid; |
| 1385 | extern EFI_GUID gEfiIa32X64ErrorTypeTlbCheckGuid; |
| 1386 | extern EFI_GUID gEfiIa32X64ErrorTypeBusCheckGuid; |
| 1387 | extern EFI_GUID gEfiIa32X64ErrorTypeMsCheckGuid; |
| 1388 | |
| 1389 | #endif |
| 1390 | |
Karthik Rajagopalan | 683e055 | 2024-03-07 12:30:43 -0800 | [diff] [blame] | 1391 | /// |
| 1392 | /// NVIDIA Error Record Section |
| 1393 | /// |
| 1394 | typedef struct { |
| 1395 | CHAR8 Signature[16]; |
| 1396 | UINT16 ErrorType; |
| 1397 | UINT16 ErrorInstance; |
| 1398 | UINT8 Severity; |
| 1399 | UINT8 Socket; |
| 1400 | UINT8 NumberRegs; |
| 1401 | UINT8 Reserved; |
| 1402 | UINT64 InstanceBase; |
| 1403 | } EFI_NVIDIA_ERROR_DATA; |
| 1404 | |
| 1405 | extern EFI_GUID gEfiNvidiaErrorSectionGuid; |
Ed Tanous | c6fead1 | 2024-06-18 13:15:58 -0700 | [diff] [blame] | 1406 | #pragma pack(pop) |
| 1407 | |
Karthik Rajagopalan | 255bd81 | 2024-09-06 14:36:34 -0700 | [diff] [blame^] | 1408 | #ifdef __cplusplus |
| 1409 | } |
| 1410 | #endif |
| 1411 | |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 1412 | #endif |