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