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