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