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