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