]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Guid/StatusCodeDataTypeId.h
MdePkg/StatusCodeDataTypeId.h: Add new definition per PI1.7 Spec
[mirror_edk2.git] / MdePkg / Include / Guid / StatusCodeDataTypeId.h
CommitLineData
b205f267 1/** @file\r
2 GUID used to identify id for the caller who is initiating the Status Code.\r
3\r
2b005f41 4 Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
9df063a0 5 This program and the accompanying materials\r
b205f267 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
9095d37b 14 These GUIDs and structures are defined in UEFI Platform Initialization Specification 1.2\r
b205f267 15 Volume 3: Shared Architectural Elements\r
16\r
17**/\r
18\r
19#ifndef __PI_STATUS_CODE_DATA_TYPE_ID_GUID_H__\r
20#define __PI_STATUS_CODE_DATA_TYPE_ID_GUID_H__\r
21\r
22#include <PiDxe.h>\r
23#include <Protocol/DebugSupport.h>\r
24\r
25///\r
26/// Global ID for the EFI_STATUS_CODE_STRING structure\r
27///\r
28#define EFI_STATUS_CODE_DATA_TYPE_STRING_GUID \\r
29 { 0x92D11080, 0x496F, 0x4D95, { 0xBE, 0x7E, 0x03, 0x74, 0x88, 0x38, 0x2B, 0x0A } }\r
ad0ecbcf 30\r
b205f267 31typedef enum {\r
32 ///\r
33 /// A NULL-terminated ASCII string.\r
34 ///\r
35 EfiStringAscii,\r
36 ///\r
37 /// A double NULL-terminated Unicode string.\r
38 ///\r
39 EfiStringUnicode,\r
40 ///\r
9095d37b 41 /// An EFI_STATUS_CODE_STRING_TOKEN representing the string. The actual\r
b205f267 42 /// string can be obtained by querying the HII Database\r
43 ///\r
44 EfiStringToken\r
45} EFI_STRING_TYPE;\r
9095d37b 46\r
b205f267 47///\r
48/// Specifies the format of the data in EFI_STATUS_CODE_STRING_DATA.String.\r
49///\r
50typedef struct {\r
51 ///\r
52 /// The HII package list which contains the string. Handle is a dynamic value that may\r
53 /// not be the same for different boots. Type EFI_HII_HANDLE is defined in\r
54 /// EFI_HII_DATABASE_PROTOCOL.NewPackageList() in the UEFI Specification.\r
55 ///\r
56 EFI_HII_HANDLE Handle;\r
57 ///\r
58 /// When combined with Handle, the string token can be used to retrieve the string.\r
59 /// Type EFI_STRING_ID is defined in EFI_IFR_OP_HEADER in the UEFI Specification.\r
60 ///\r
61 EFI_STRING_ID Token;\r
62} EFI_STATUS_CODE_STRING_TOKEN;\r
9095d37b 63\r
b205f267 64typedef union {\r
65 ///\r
66 /// ASCII formatted string.\r
67 ///\r
68 CHAR8 *Ascii;\r
69 ///\r
70 /// Unicode formatted string.\r
71 ///\r
72 CHAR16 *Unicode;\r
73 ///\r
74 /// HII handle/token pair.\r
75 ///\r
76 EFI_STATUS_CODE_STRING_TOKEN Hii;\r
77} EFI_STATUS_CODE_STRING;\r
9095d37b 78\r
b205f267 79///\r
9095d37b
LG
80/// This data type defines a string type of extended data. A string can accompany\r
81/// any status code. The string can provide additional information about the\r
82/// status code. The string can be ASCII, Unicode, or a Human Interface Infrastructure\r
b205f267 83/// (HII) token/GUID pair.\r
84///\r
85typedef struct {\r
86 ///\r
87 /// The data header identifying the data. DataHeader.HeaderSize should be\r
88 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
d1eff2f5 89 /// sizeof (EFI_STATUS_CODE_STRING_DATA) - HeaderSize, and\r
b205f267 90 /// DataHeader.Type should be\r
91 /// EFI_STATUS_CODE_DATA_TYPE_STRING_GUID.\r
9095d37b
LG
92 ///\r
93 EFI_STATUS_CODE_DATA DataHeader;\r
b205f267 94 ///\r
95 /// Specifies the format of the data in String.\r
96 ///\r
97 EFI_STRING_TYPE StringType;\r
98 ///\r
9095d37b 99 /// A pointer to the extended data. The data follows the format specified by\r
b205f267 100 /// StringType.\r
101 ///\r
102 EFI_STATUS_CODE_STRING String;\r
103} EFI_STATUS_CODE_STRING_DATA;\r
104\r
b205f267 105extern EFI_GUID gEfiStatusCodeDataTypeStringGuid;\r
106\r
107///\r
108/// Global ID for the following structures:\r
109/// - EFI_DEVICE_PATH_EXTENDED_DATA\r
110/// - EFI_DEVICE_HANDLE_EXTENDED_DATA\r
111/// - EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA\r
112/// - EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA\r
113/// - EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA\r
114/// - EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA\r
115/// - EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA\r
116/// - EFI_MEMORY_RANGE_EXTENDED_DATA\r
117/// - EFI_DEBUG_ASSERT_DATA\r
118/// - EFI_STATUS_CODE_EXCEP_EXTENDED_DATA\r
119/// - EFI_STATUS_CODE_START_EXTENDED_DATA\r
120/// - EFI_LEGACY_OPROM_EXTENDED_DATA\r
2b005f41 121/// - EFI_RETURN_STATUS_EXTENDED_DATA\r
b205f267 122///\r
123#define EFI_STATUS_CODE_SPECIFIC_DATA_GUID \\r
124 { 0x335984bd, 0xe805, 0x409a, { 0xb8, 0xf8, 0xd2, 0x7e, 0xce, 0x5f, 0xf7, 0xa6 } }\r
125\r
b205f267 126///\r
9095d37b 127/// Extended data about the device path, which is used for many errors and\r
b205f267 128/// progress codes to point to the device.\r
129///\r
130/// The device path is used to point to the physical device in case there is more than one device\r
131/// belonging to the same subclass. For example, the system may contain two USB keyboards and one\r
132/// PS/2* keyboard. The driver that parses the status code can use the device path extended data to\r
133/// differentiate between the three. The index field is not useful in this case because there is no standard\r
134/// numbering convention. Device paths are preferred over using device handles because device handles\r
135/// for a given device can change from one boot to another and do not mean anything beyond Boot\r
136/// Services time. In certain cases, the bus driver may not create a device handle for a given device if it\r
137/// detects a critical error. In these cases, the device path extended data can be used to refer to the\r
138/// device, but there may not be any device handles with an instance of\r
139/// EFI_DEVICE_PATH_PROTOCOL that matches DevicePath. The variable device path structure\r
140/// is included in this structure to make it self sufficient.\r
141///\r
142typedef struct {\r
143 ///\r
144 /// The data header identifying the data. DataHeader.HeaderSize should be\r
145 /// sizeof (EFI_STATUS_CODE_DATA). DataHeader.Size should be the size\r
146 /// of variable-length DevicePath, and DataHeader.Size is zero for a virtual\r
147 /// device that does not have a device path. DataHeader.Type should be\r
148 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
149 ///\r
150 EFI_STATUS_CODE_DATA DataHeader;\r
151 ///\r
9095d37b 152 /// The device path to the controller or the hardware device. Note that this parameter is a\r
6ce55357
SQ
153 /// variable-length device path structure and not a pointer to such a structure. This structure is\r
154 /// populated only if it is a physical device. For virtual devices, the Size field in DataHeader\r
155 /// is set to zero and this field is not populated.\r
b205f267 156 ///\r
6ce55357 157 // EFI_DEVICE_PATH_PROTOCOL DevicePath;\r
b205f267 158} EFI_DEVICE_PATH_EXTENDED_DATA;\r
159\r
160///\r
161/// Device handle Extended Data. Used for many\r
162/// errors and progress codes to point to the device.\r
163///\r
164/// The handle of the device with which the progress or error code is associated. The handle is\r
165/// guaranteed to be accurate only at the time the status code is reported. Handles are dynamic entities\r
166/// between boots, so handles cannot be considered to be valid if the system has reset subsequent to the\r
167/// status code being reported. Handles may be used to determine a wide variety of useful information\r
168/// about the source of the status code.\r
169///\r
170typedef struct {\r
171 ///\r
172 /// The data header identifying the data. DataHeader.HeaderSize should be\r
173 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
174 /// sizeof (EFI_DEVICE_HANDLE_EXTENDED_DATA) - HeaderSize, and\r
175 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
176 ///\r
177 EFI_STATUS_CODE_DATA DataHeader;\r
178 ///\r
179 /// The device handle.\r
180 ///\r
181 EFI_HANDLE Handle;\r
182} EFI_DEVICE_HANDLE_EXTENDED_DATA;\r
183\r
184///\r
185/// This structure defines extended data describing a PCI resource allocation error.\r
186///\r
9095d37b 187/// @par Note:\r
b205f267 188/// The following structure contains variable-length fields and cannot be defined as a C-style\r
189/// structure.\r
190///\r
191/// This extended data conveys details for a PCI resource allocation failure error. See the PCI\r
192/// specification and the ACPI specification for details on PCI resource allocations and the format for\r
193/// resource descriptors. This error does not detail why the resource allocation failed. It may be due to a\r
194/// bad resource request or a lack of available resources to satisfy a valid request. The variable device\r
195/// path structure and the resource structures are included in this structure to make it self sufficient.\r
196///\r
197typedef struct {\r
198 ///\r
199 /// The data header identifying the data. DataHeader.HeaderSize should be sizeof\r
200 /// (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
201 /// (DevicePathSize + DevicePathSize + DevicePathSize +\r
202 /// sizeof(UINT32) + 3 * sizeof (UINT16) ), and DataHeader.Type\r
203 /// should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
204 ///\r
205 EFI_STATUS_CODE_DATA DataHeader;\r
206 ///\r
207 /// The PCI BAR. Applicable only for PCI devices. Ignored for all other devices.\r
208 ///\r
209 UINT32 Bar;\r
210 ///\r
211 /// DevicePathSize should be zero if it is a virtual device that is not associated with\r
212 /// a device path. Otherwise, this parameter is the length of the variable-length\r
9095d37b 213 /// DevicePath.\r
b205f267 214 ///\r
215 UINT16 DevicePathSize;\r
216 ///\r
217 /// Represents the size the ReqRes parameter. ReqResSize should be zero if the\r
218 /// requested resources are not provided as a part of extended data.\r
219 ///\r
220 UINT16 ReqResSize;\r
221 ///\r
222 /// Represents the size the AllocRes parameter. AllocResSize should be zero if the\r
223 /// allocated resources are not provided as a part of extended data.\r
224 ///\r
225 UINT16 AllocResSize;\r
226 ///\r
9095d37b
LG
227 /// The device path to the controller or the hardware device that did not get the requested\r
228 /// resources. Note that this parameter is the variable-length device path structure and not\r
229 /// a pointer to this structure.\r
b205f267 230 ///\r
6ce55357 231 // EFI_DEVICE_PATH_PROTOCOL DevicePath;\r
b205f267 232 ///\r
233 /// The requested resources in the format of an ACPI 2.0 resource descriptor. This\r
234 /// parameter is not a pointer; it is the complete resource descriptor.\r
235 ///\r
cb1366a8 236 // UINT8 ReqRes[];\r
b205f267 237 ///\r
9095d37b 238 /// The allocated resources in the format of an ACPI 2.0 resource descriptor. This\r
b205f267 239 /// parameter is not a pointer; it is the complete resource descriptor.\r
240 ///\r
cb1366a8 241 // UINT8 AllocRes[];\r
b205f267 242} EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA;\r
243\r
244///\r
245/// This structure provides a calculation for base-10 representations.\r
246///\r
247/// Not consistent with PI 1.2 Specification.\r
9095d37b 248/// This data type is not defined in the PI 1.2 Specification, but is\r
b205f267 249/// required by several of the other data structures in this file.\r
250///\r
251typedef struct {\r
252 ///\r
253 /// The INT16 number by which to multiply the base-2 representation.\r
254 ///\r
255 INT16 Value;\r
256 ///\r
9095d37b 257 /// The INT16 number by which to raise the base-2 calculation.\r
b205f267 258 ///\r
259 INT16 Exponent;\r
260} EFI_EXP_BASE10_DATA;\r
261\r
262///\r
9095d37b
LG
263/// This structure provides the voltage at the time of error. It also provides\r
264/// the threshold value indicating the minimum or maximum voltage that is considered\r
265/// an error. If the voltage is less then the threshold, the error indicates that the\r
266/// voltage fell below the minimum acceptable value. If the voltage is greater then the threshold,\r
b205f267 267/// the error indicates that the voltage rose above the maximum acceptable value.\r
268///\r
269typedef struct {\r
270 ///\r
271 /// The data header identifying the data. DataHeader.HeaderSize should be\r
272 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
273 /// sizeof (EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA) -\r
274 /// HeaderSize, and DataHeader.Type should be\r
275 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
276 ///\r
277 EFI_STATUS_CODE_DATA DataHeader;\r
278 ///\r
279 /// The voltage value at the time of the error.\r
280 ///\r
281 EFI_EXP_BASE10_DATA Voltage;\r
282 ///\r
283 /// The voltage threshold.\r
284 ///\r
285 EFI_EXP_BASE10_DATA Threshold;\r
286} EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA;\r
287\r
288///\r
289/// Microcode Update Extended Error Data\r
290///\r
291typedef struct {\r
292 ///\r
293 /// The data header identifying the data. DataHeader.HeaderSize should be\r
294 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
295 /// sizeof (EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA) -\r
296 /// HeaderSize, and DataHeader.Type should be\r
297 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
298 ///\r
299 EFI_STATUS_CODE_DATA DataHeader;\r
300 ///\r
301 /// The version of the microcode update from the header.\r
302 ///\r
303 UINT32 Version;\r
304} EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA;\r
305\r
306///\r
307/// This structure provides details about the computing unit timer expiration error.\r
308/// The timer limit provides the timeout value of the timer prior to expiration.\r
309///\r
310typedef struct {\r
311 ///\r
312 /// The data header identifying the data. DataHeader.HeaderSize should be\r
313 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
314 /// sizeof (EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA) -\r
315 /// HeaderSize, and DataHeader.Type should be\r
9095d37b 316 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
b205f267 317 ///\r
318 EFI_STATUS_CODE_DATA DataHeader;\r
319 ///\r
320 /// The number of seconds that the computing unit timer was configured to expire.\r
321 ///\r
322 EFI_EXP_BASE10_DATA TimerLimit;\r
323} EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA;\r
324\r
325///\r
326/// Attribute bits for EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA.Attributes\r
327/// All other attributes are reserved for future use and must be initialized to 0.\r
328///\r
329///@{\r
330#define EFI_COMPUTING_UNIT_MISMATCH_SPEED 0x0001\r
331#define EFI_COMPUTING_UNIT_MISMATCH_FSB_SPEED 0x0002\r
332#define EFI_COMPUTING_UNIT_MISMATCH_FAMILY 0x0004\r
333#define EFI_COMPUTING_UNIT_MISMATCH_MODEL 0x0008\r
334#define EFI_COMPUTING_UNIT_MISMATCH_STEPPING 0x0010\r
335#define EFI_COMPUTING_UNIT_MISMATCH_CACHE_SIZE 0x0020\r
336#define EFI_COMPUTING_UNIT_MISMATCH_OEM1 0x1000\r
337#define EFI_COMPUTING_UNIT_MISMATCH_OEM2 0x2000\r
338#define EFI_COMPUTING_UNIT_MISMATCH_OEM3 0x4000\r
339#define EFI_COMPUTING_UNIT_MISMATCH_OEM4 0x8000\r
340///@}\r
341\r
342///\r
343/// This structure defines extended data for processor mismatch errors.\r
344///\r
9095d37b
LG
345/// This provides information to indicate which processors mismatch, and how they mismatch. The\r
346/// status code contains the instance number of the processor that is in error. This structure's\r
347/// Instance indicates the second processor that does not match. This differentiation allows the\r
348/// consumer to determine which two processors do not match. The Attributes indicate what\r
349/// mismatch is being reported. Because Attributes is a bit field, more than one mismatch can be\r
b205f267 350/// reported with one error code.\r
351///\r
352typedef struct {\r
353 ///\r
354 /// The data header identifying the data. DataHeader.HeaderSize should be\r
355 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
356 /// sizeof (EFI_ HOST_PROCESSOR_MISMATCH_ERROR_DATA) -\r
357 /// HeaderSize , and DataHeader.Type should be\r
9095d37b 358 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
b205f267 359 ///\r
360 EFI_STATUS_CODE_DATA DataHeader;\r
361 ///\r
362 /// The unit number of the computing unit that does not match.\r
9095d37b 363 ///\r
b205f267 364 UINT32 Instance;\r
9095d37b
LG
365 ///\r
366 /// The attributes describing the failure.\r
367 ///\r
b205f267 368 UINT16 Attributes;\r
369} EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA;\r
370\r
371///\r
372/// This structure provides details about the computing unit thermal failure.\r
373///\r
9095d37b 374/// This structure provides the temperature at the time of error. It also provides the threshold value\r
b205f267 375/// indicating the minimum temperature that is considered an error.\r
376///\r
377typedef struct {\r
378 ///\r
379 /// The data header identifying the data. DataHeader.HeaderSize should be\r
380 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
381 /// sizeof (EFI_COMPUTING_UNIT_THERMAL_ERROR_DATA) -\r
382 /// HeaderSize , and DataHeader.Type should be\r
9095d37b 383 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
b205f267 384 ///\r
385 EFI_STATUS_CODE_DATA DataHeader;\r
386 ///\r
387 /// The thermal value at the time of the error.\r
388 ///\r
389 EFI_EXP_BASE10_DATA Temperature;\r
390 ///\r
391 /// The thermal threshold.\r
392 ///\r
393 EFI_EXP_BASE10_DATA Threshold;\r
394} EFI_COMPUTING_UNIT_THERMAL_ERROR_DATA;\r
395\r
396///\r
397/// Enumeration of valid cache types\r
398///\r
399typedef enum {\r
400 EfiInitCacheDataOnly,\r
401 EfiInitCacheInstrOnly,\r
402 EfiInitCacheBoth,\r
403 EfiInitCacheUnspecified\r
404} EFI_INIT_CACHE_TYPE;\r
405\r
406///\r
407/// Embedded cache init extended data\r
408///\r
409typedef struct {\r
410 ///\r
411 /// The data header identifying the data. DataHeader.HeaderSize should be\r
412 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
413 /// sizeof (EFI_CACHE_INIT_DATA) - HeaderSize , and\r
414 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
415 ///\r
416 EFI_STATUS_CODE_DATA DataHeader;\r
417 ///\r
418 /// The cache level. Starts with 1 for level 1 cache.\r
419 ///\r
420 UINT32 Level;\r
421 ///\r
422 /// The type of cache.\r
423 ///\r
424 EFI_INIT_CACHE_TYPE Type;\r
425} EFI_CACHE_INIT_DATA;\r
426\r
427///\r
428///\r
429///\r
430typedef UINT32 EFI_CPU_STATE_CHANGE_CAUSE;\r
431\r
432///\r
9095d37b 433/// The reasons that the processor is disabled.\r
b205f267 434/// Used to fill in EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA.Cause.\r
435///\r
436///@{\r
437#define EFI_CPU_CAUSE_INTERNAL_ERROR 0x0001\r
438#define EFI_CPU_CAUSE_THERMAL_ERROR 0x0002\r
439#define EFI_CPU_CAUSE_SELFTEST_FAILURE 0x0004\r
440#define EFI_CPU_CAUSE_PREBOOT_TIMEOUT 0x0008\r
441#define EFI_CPU_CAUSE_FAILED_TO_START 0x0010\r
442#define EFI_CPU_CAUSE_CONFIG_ERROR 0x0020\r
443#define EFI_CPU_CAUSE_USER_SELECTION 0x0080\r
444#define EFI_CPU_CAUSE_BY_ASSOCIATION 0x0100\r
445#define EFI_CPU_CAUSE_UNSPECIFIED 0x8000\r
446///@}\r
447\r
448///\r
449/// This structure provides information about the disabled computing unit.\r
450///\r
9095d37b
LG
451/// This structure provides details as to why and how the computing unit was disabled. The causes\r
452/// should cover the typical reasons a processor would be disabled. How the processor was disabled is\r
b205f267 453/// important because there are distinct differences between hardware and software disabling.\r
454///\r
455typedef struct {\r
456 ///\r
457 /// The data header identifying the data. DataHeader.HeaderSize should be\r
458 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
459 /// sizeof (EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA) -\r
460 /// HeaderSize, and DataHeader.Type should be\r
461 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
462 ///\r
463 EFI_STATUS_CODE_DATA DataHeader;\r
464 ///\r
9095d37b
LG
465 /// The reason for disabling the processor.\r
466 ///\r
b205f267 467 UINT32 Cause;\r
468 ///\r
9095d37b
LG
469 /// TRUE if the processor is disabled via software means such as not listing it in the ACPI tables.\r
470 /// Such a processor will respond to Interprocessor Interrupts (IPIs). FALSE if the processor is hardware\r
b205f267 471 /// disabled, which means it is invisible to software and will not respond to IPIs.\r
472 ///\r
473 BOOLEAN SoftwareDisabled;\r
474} EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA;\r
475\r
476///\r
477/// Memory Error Granularity Definition\r
478///\r
479typedef UINT8 EFI_MEMORY_ERROR_GRANULARITY;\r
480\r
481///\r
482/// Memory Error Granularities. Used to fill in EFI_MEMORY_EXTENDED_ERROR_DATA.Granularity.\r
483///\r
484///@{\r
485#define EFI_MEMORY_ERROR_OTHER 0x01\r
486#define EFI_MEMORY_ERROR_UNKNOWN 0x02\r
487#define EFI_MEMORY_ERROR_DEVICE 0x03\r
488#define EFI_MEMORY_ERROR_PARTITION 0x04\r
489///@}\r
490\r
491///\r
492/// Memory Error Operation Definition\r
493///\r
494typedef UINT8 EFI_MEMORY_ERROR_OPERATION;\r
495\r
496///\r
497/// Memory Error Operations. Used to fill in EFI_MEMORY_EXTENDED_ERROR_DATA.Operation.\r
498///\r
499///@{\r
500#define EFI_MEMORY_OPERATION_OTHER 0x01\r
501#define EFI_MEMORY_OPERATION_UNKNOWN 0x02\r
502#define EFI_MEMORY_OPERATION_READ 0x03\r
503#define EFI_MEMORY_OPERATION_WRITE 0x04\r
504#define EFI_MEMORY_OPERATION_PARTIAL_WRITE 0x05\r
505///@}\r
506\r
507///\r
9095d37b
LG
508/// This structure provides specific details about the memory error that was detected. It provides\r
509/// enough information so that consumers can identify the exact failure and provides enough\r
b205f267 510/// information to enable corrective action if necessary.\r
511///\r
512typedef struct {\r
513 ///\r
514 /// The data header identifying the data. DataHeader.HeaderSize should be\r
515 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
516 /// sizeof (EFI_MEMORY_EXTENDED_ERROR_DATA) - HeaderSize, and\r
9095d37b 517 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
b205f267 518 ///\r
519 EFI_STATUS_CODE_DATA DataHeader;\r
520 ///\r
521 /// The error granularity type.\r
522 ///\r
523 EFI_MEMORY_ERROR_GRANULARITY Granularity;\r
524 ///\r
9095d37b 525 /// The operation that resulted in the error being detected.\r
b205f267 526 ///\r
527 EFI_MEMORY_ERROR_OPERATION Operation;\r
528 ///\r
9095d37b 529 /// The error syndrome, vendor-specific ECC syndrome, or CRC data associated with\r
b205f267 530 /// the error. If unknown, should be initialized to 0.\r
9095d37b 531 /// Inconsistent with specification here:\r
b205f267 532 /// This field in StatusCodes spec0.9 is defined as UINT32, keep code unchanged.\r
533 ///\r
534 UINTN Syndrome;\r
535 ///\r
9095d37b 536 /// The physical address of the error.\r
b205f267 537 ///\r
538 EFI_PHYSICAL_ADDRESS Address;\r
539 ///\r
540 /// The range, in bytes, within which the error address can be determined.\r
541 ///\r
542 UINTN Resolution;\r
543} EFI_MEMORY_EXTENDED_ERROR_DATA;\r
544\r
545///\r
546/// A definition to describe that the operation is performed on multiple devices within the array.\r
9095d37b 547/// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device.\r
b205f267 548///\r
549#define EFI_MULTIPLE_MEMORY_DEVICE_OPERATION 0xfffe\r
550\r
551///\r
552/// A definition to describe that the operation is performed on all devices within the array.\r
9095d37b 553/// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device.\r
b205f267 554///\r
555#define EFI_ALL_MEMORY_DEVICE_OPERATION 0xffff\r
556\r
557///\r
558/// A definition to describe that the operation is performed on multiple arrays.\r
9095d37b 559/// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device.\r
b205f267 560///\r
561#define EFI_MULTIPLE_MEMORY_ARRAY_OPERATION 0xfffe\r
562\r
563///\r
564/// A definition to describe that the operation is performed on all the arrays.\r
9095d37b 565/// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device.\r
b205f267 566///\r
567#define EFI_ALL_MEMORY_ARRAY_OPERATION 0xffff\r
568\r
569///\r
9095d37b
LG
570/// This extended data provides some context that consumers can use to locate a DIMM within the\r
571/// overall memory scheme.\r
b205f267 572///\r
573/// This extended data provides some context that consumers can use to locate a DIMM within the\r
574/// overall memory scheme. The Array and Device numbers may indicate a specific DIMM, or they\r
575/// may be populated with the group definitions in "Related Definitions" below.\r
576///\r
577typedef struct {\r
578 ///\r
579 /// The data header identifying the data. DataHeader.HeaderSize should be\r
580 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
581 /// sizeof (EFI_STATUS_CODE_DIMM_NUMBER) - HeaderSize, and\r
582 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
583 ///\r
584 EFI_STATUS_CODE_DATA DataHeader;\r
585 ///\r
586 /// The memory array number.\r
587 ///\r
588 UINT16 Array;\r
589 ///\r
590 /// The device number within that Array.\r
591 ///\r
592 UINT16 Device;\r
593} EFI_STATUS_CODE_DIMM_NUMBER;\r
594\r
595///\r
596/// This structure defines extended data describing memory modules that do not match.\r
597///\r
598/// This extended data may be used to convey the specifics of memory modules that do not match.\r
9095d37b 599///\r
b205f267 600typedef struct {\r
601 ///\r
602 /// The data header identifying the data. DataHeader.HeaderSize should be\r
603 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
604 /// sizeof (EFI_MEMORY_MODULE_MISMATCH_ERROR_DATA) -\r
605 /// HeaderSize, and DataHeader.Type should be\r
606 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
607 ///\r
608 EFI_STATUS_CODE_DATA DataHeader;\r
609 ///\r
9095d37b 610 /// The instance number of the memory module that does not match.\r
b205f267 611 ///\r
612 EFI_STATUS_CODE_DIMM_NUMBER Instance;\r
613} EFI_MEMORY_MODULE_MISMATCH_ERROR_DATA;\r
614\r
615///\r
616/// This structure defines extended data describing a memory range.\r
617///\r
9095d37b 618/// This extended data may be used to convey the specifics of a memory range. Ranges are specified\r
b205f267 619/// with a start address and a length.\r
620///\r
621typedef struct {\r
622 ///\r
623 /// The data header identifying the data. DataHeader.HeaderSize should be\r
624 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
625 /// sizeof (EFI_MEMORY_RANGE_EXTENDED_DATA) - HeaderSize, and\r
9095d37b 626 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
b205f267 627 ///\r
628 EFI_STATUS_CODE_DATA DataHeader;\r
629 ///\r
9095d37b 630 /// The starting address of the memory range.\r
b205f267 631 ///\r
632 EFI_PHYSICAL_ADDRESS Start;\r
633 ///\r
634 /// The length in bytes of the memory range.\r
635 ///\r
636 EFI_PHYSICAL_ADDRESS Length;\r
637} EFI_MEMORY_RANGE_EXTENDED_DATA;\r
638\r
639///\r
640/// This structure provides the assert information that is typically associated with a debug assertion failing.\r
641///\r
642/// The data indicates the location of the assertion that failed in the source code. This information\r
643/// includes the file name and line number that are necessary to find the failing assertion in source code.\r
644///\r
645typedef struct {\r
646 ///\r
647 /// The data header identifying the data. DataHeader.HeaderSize should be\r
648 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
d1eff2f5 649 /// sizeof (EFI_DEBUG_ASSERT_DATA) - HeaderSize , and\r
b205f267 650 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
9095d37b 651 ///\r
b205f267 652 EFI_STATUS_CODE_DATA DataHeader;\r
653 ///\r
654 /// The line number of the source file where the fault was generated.\r
655 ///\r
656 UINT32 LineNumber;\r
657 ///\r
658 /// The size in bytes of FileName.\r
659 ///\r
660 UINT32 FileNameSize;\r
661 ///\r
9095d37b 662 /// A pointer to a NULL-terminated ASCII or Unicode string that represents\r
b205f267 663 /// the file name of the source file where the fault was generated.\r
664 ///\r
665 EFI_STATUS_CODE_STRING_DATA *FileName;\r
666} EFI_DEBUG_ASSERT_DATA;\r
667\r
668///\r
669/// System Context Data EBC/IA32/IPF\r
670///\r
671typedef union {\r
672 ///\r
673 /// The context of the EBC virtual machine when the exception was generated. Type\r
674 /// EFI_SYSTEM_CONTEXT_EBC is defined in EFI_DEBUG_SUPPORT_PROTOCOL\r
675 /// in the UEFI Specification.\r
676 ///\r
677 EFI_SYSTEM_CONTEXT_EBC SystemContextEbc;\r
678 ///\r
679 /// The context of the IA-32 processor when the exception was generated. Type\r
680 /// EFI_SYSTEM_CONTEXT_IA32 is defined in the\r
681 /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification.\r
682 ///\r
683 EFI_SYSTEM_CONTEXT_IA32 SystemContextIa32;\r
684 ///\r
685 /// The context of the Itanium(R) processor when the exception was generated. Type\r
686 /// EFI_SYSTEM_CONTEXT_IPF is defined in the\r
687 /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification.\r
688 ///\r
689 EFI_SYSTEM_CONTEXT_IPF SystemContextIpf;\r
31c21fd3 690 ///\r
691 /// The context of the X64 processor when the exception was generated. Type\r
692 /// EFI_SYSTEM_CONTEXT_X64 is defined in the\r
693 /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification.\r
694 ///\r
9095d37b 695 EFI_SYSTEM_CONTEXT_X64 SystemContextX64;\r
31c21fd3 696 ///\r
697 /// The context of the ARM processor when the exception was generated. Type\r
698 /// EFI_SYSTEM_CONTEXT_ARM is defined in the\r
699 /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification.\r
700 ///\r
701 EFI_SYSTEM_CONTEXT_ARM SystemContextArm;\r
b205f267 702} EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT;\r
703\r
704///\r
705/// This structure defines extended data describing a processor exception error.\r
706///\r
707/// This extended data allows the processor context that is present at the time of the exception to be\r
708/// reported with the exception. The format and contents of the context data varies depending on the\r
709/// processor architecture.\r
710///\r
711typedef struct {\r
712 ///\r
713 /// The data header identifying the data. DataHeader.HeaderSize should be\r
714 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
d1eff2f5 715 /// sizeof (EFI_STATUS_CODE_EXCEP_EXTENDED_DATA) - HeaderSize,\r
b205f267 716 /// and DataHeader.Type should be\r
9095d37b 717 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
b205f267 718 ///\r
719 EFI_STATUS_CODE_DATA DataHeader;\r
720 ///\r
9095d37b 721 /// The system context.\r
b205f267 722 ///\r
723 EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT Context;\r
724} EFI_STATUS_CODE_EXCEP_EXTENDED_DATA;\r
725\r
726///\r
727/// This structure defines extended data describing a call to a driver binding protocol start function.\r
728///\r
729/// This extended data records information about a Start() function call. Start() is a member of\r
730/// the UEFI Driver Binding Protocol.\r
731///\r
732typedef struct {\r
9095d37b 733 ///\r
b205f267 734 /// The data header identifying the data. DataHeader.HeaderSize should be\r
735 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
736 /// sizeof (EFI_STATUS_CODE_START_EXTENDED_DATA) - HeaderSize,\r
737 /// and DataHeader.Type should be\r
9095d37b 738 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
b205f267 739 ///\r
740 EFI_STATUS_CODE_DATA DataHeader;\r
741 ///\r
9095d37b 742 /// The controller handle.\r
b205f267 743 ///\r
744 EFI_HANDLE ControllerHandle;\r
745 ///\r
746 /// The driver binding handle.\r
747 ///\r
748 EFI_HANDLE DriverBindingHandle;\r
9095d37b
LG
749 ///\r
750 /// The size of the RemainingDevicePath. It is zero if the Start() function is\r
b205f267 751 /// called with RemainingDevicePath = NULL. The UEFI Specification allows\r
752 /// that the Start() function of bus drivers can be called in this way.\r
753 ///\r
754 UINT16 DevicePathSize;\r
755 ///\r
9095d37b
LG
756 /// Matches the RemainingDevicePath parameter being passed to the Start() function.\r
757 /// Note that this parameter is the variable-length device path and not a pointer\r
b205f267 758 /// to the device path.\r
9095d37b 759 ///\r
6ce55357 760 // EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath;\r
b205f267 761} EFI_STATUS_CODE_START_EXTENDED_DATA;\r
762\r
763///\r
764/// This structure defines extended data describing a legacy option ROM (OpROM).\r
765///\r
766/// The device handle and ROM image base can be used by consumers to determine which option ROM\r
767/// failed. Due to the black-box nature of legacy option ROMs, the amount of information that can be\r
768/// obtained may be limited.\r
769///\r
770typedef struct {\r
771 ///\r
772 /// The data header identifying the data. DataHeader.HeaderSize should be\r
773 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r
774 /// sizeof (EFI_LEGACY_OPROM_EXTENDED_DATA) - HeaderSize, and\r
9095d37b 775 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
b205f267 776 ///\r
777 EFI_STATUS_CODE_DATA DataHeader;\r
778 ///\r
779 /// The handle corresponding to the device that this legacy option ROM is being invoked.\r
780 ///\r
781 EFI_HANDLE DeviceHandle;\r
782 ///\r
9095d37b 783 /// The base address of the shadowed legacy ROM image. May or may not point to the shadow RAM area.\r
b205f267 784 ///\r
785 EFI_PHYSICAL_ADDRESS RomImageBase;\r
786} EFI_LEGACY_OPROM_EXTENDED_DATA;\r
787\r
2b005f41
DB
788///\r
789/// This structure defines extended data describing an EFI_STATUS return value that stands for a\r
790/// failed function call (such as a UEFI boot service).\r
791///\r
792typedef struct {\r
793 ///\r
794 /// The data header identifying the data:\r
795 /// DataHeader.HeaderSize should be sizeof(EFI_STATUS_CODE_DATA),\r
796 /// DataHeader.Size should be sizeof(EFI_RETURN_STATUS_EXTENDED_DATA) - HeaderSize,\r
797 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r
798 ///\r
799 EFI_STATUS_CODE_DATA DataHeader;\r
800 ///\r
801 /// The EFI_STATUS return value of the service or function whose failure triggered the\r
802 /// reporting of the status code (generally an error code or a debug code).\r
803 ///\r
804 EFI_STATUS ReturnStatus;\r
805} EFI_RETURN_STATUS_EXTENDED_DATA;\r
806\r
b205f267 807extern EFI_GUID gEfiStatusCodeSpecificDataGuid;\r
808\r
809#endif\r