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