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