2 GUID used to identify id for the caller who is initiating the Status Code.
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
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.
13 @par Revision Reference:
14 GUIDs defined in Status Codes Specification 0.92
18 #ifndef __STATUS_CODE_DATA_TYPE_ID_GUID_H__
19 #define __STATUS_CODE_DATA_TYPE_ID_GUID_H__
21 #include <FrameworkDxe.h>
22 #include <Protocol/DebugSupport.h>
23 #include <Protocol/FrameworkHii.h>
24 #include <Guid/DataHubRecords.h>
26 //////////////////////////////////////////////////////////////////////////////////////////
27 // String Data Type defintion. This is part of Status Code Specification
28 //////////////////////////////////////////////////////////////////////////////////////////
29 #define EFI_STATUS_CODE_DATA_TYPE_STRING_GUID \
30 { 0x92D11080, 0x496F, 0x4D95, { 0xBE, 0x7E, 0x03, 0x74, 0x88, 0x38, 0x2B, 0x0A } }
35 EfiStringAscii
, ///< A NULL-terminated ASCII string.
36 EfiStringUnicode
, ///< A double NULL-terminated Unicode string.
37 EfiStringToken
///< An EFI_STATUS_CODE_STRING_TOKEN representing the string.
38 ///< The actual string can be obtained by querying the HII Database.
42 FRAMEWORK_EFI_HII_HANDLE Handle
; ///< The HII handle of the string pack, which can be
43 ///< used to retrieve the string. It is a dynamic value
44 ///< that may not be the same for different boots.
45 STRING_REF Token
; ///< When combined with the HII handle, the string
46 ///< token can be used to retrieve the string.
48 } EFI_STATUS_CODE_STRING_TOKEN
;
51 CHAR8
*Ascii
; ///< ASCII formatted string.
52 CHAR16
*Unicode
; ///< Unicode formatted string.
53 EFI_STATUS_CODE_STRING_TOKEN Hii
; ///< HII handle/token pair.
54 } EFI_STATUS_CODE_STRING
;
57 EFI_STATUS_CODE_DATA DataHeader
; ///< The data header identifying the data.
58 EFI_STRING_TYPE StringType
; ///< Specifies if the string is ASCII or Unicode.
59 EFI_STATUS_CODE_STRING String
; ///< A pointer to a null-terminated ASCII or Unicode string.
60 } EFI_STATUS_CODE_STRING_DATA
;
63 extern EFI_GUID gEfiStatusCodeDataTypeStringGuid
;
66 //////////////////////////////////////////////////////////////////////////////////////////
67 // Special Data Type defintion. This is part of Status Code Specification
68 //////////////////////////////////////////////////////////////////////////////////////////
69 #define EFI_STATUS_CODE_SPECIFIC_DATA_GUID \
70 { 0x335984bd, 0xe805, 0x409a, { 0xb8, 0xf8, 0xd2, 0x7e, 0xce, 0x5f, 0xf7, 0xa6 } }
75 /// Device handle Extended Data. Used for many
76 /// errors and progress codes to point to the device.
79 EFI_STATUS_CODE_DATA DataHeader
;
81 } EFI_DEVICE_HANDLE_EXTENDED_DATA
;
84 /// Extended data about the device path, which is used for many errors and
85 /// progress codes to point to the device.
88 EFI_STATUS_CODE_DATA DataHeader
;
90 } EFI_DEVICE_PATH_EXTENDED_DATA
;
93 /// This structure defines extended data describing a PCI resource allocation error.
96 EFI_STATUS_CODE_DATA DataHeader
;
98 UINT16 DevicePathSize
;
104 } EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA
;
107 /// This structure provides the voltage at the time of error. It also provides
108 /// the threshold value indicating the minimum or maximum voltage that is considered
109 /// an error. If the voltage is less then the threshold, the error indicates that the
110 /// voltage fell below the minimum acceptable value. If the voltage is greater then the threshold,
111 /// the error indicates that the voltage rose above the maximum acceptable value.
115 /// The data header identifying the data.
117 EFI_STATUS_CODE_DATA DataHeader
;
119 /// The voltage value at the time of the error.
121 EFI_EXP_BASE10_DATA Voltage
;
123 /// The voltage threshold.
125 EFI_EXP_BASE10_DATA Threshold
;
126 } EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA
;
129 /// Microcode Update Extended Error Data
133 /// The data header identifying the data.
135 EFI_STATUS_CODE_DATA DataHeader
;
137 /// The version of the microcode update from the header.
140 } EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA
;
143 /// Asynchronous Timer Extended Error Data
144 /// The timer limit provides the timeout value of the timer prior to expiration.
148 /// The data header identifying the data.
150 EFI_STATUS_CODE_DATA DataHeader
;
152 /// The number of seconds that the computing unit timer was configured to expire.
154 EFI_EXP_BASE10_DATA TimerLimit
;
155 } EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA
;
158 /// Host Processor Mismatch Extended Error Data
159 /// This provides information to indicate which processors mismatch, and how they mismatch. The
160 /// status code contains the instance number of the processor that is in error. This structure's
161 /// Instance indicates the second processor that does not match. This differentiation allows the
162 /// consumer to determine which two processors do not match. The Attributes indicate what
163 /// mismatch is being reported. Because Attributes is a bit field, more than one mismatch can be
164 /// reported with one error code.
168 /// The data header identifying the data.
170 EFI_STATUS_CODE_DATA DataHeader
;
172 /// The unit number of the computing unit that does not match.
176 /// The attributes describing the failure.
179 } EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA
;
182 /// Thermal Extended Error Data
183 /// This structure provides the temperature at the time of error. It also provides the threshold value
184 /// indicating the minimum temperature that is considered an error.
188 /// The data header identifying the data.
190 EFI_STATUS_CODE_DATA DataHeader
;
192 /// The thermal value at the time of the error.
194 EFI_EXP_BASE10_DATA Temperature
;
196 /// The thermal threshold.
198 EFI_EXP_BASE10_DATA Threshold
;
199 } EFI_COMPUTING_UNIT_THERMAL_ERROR_DATA
;
205 EfiInitCacheDataOnly
,
206 EfiInitCacheInstrOnly
,
208 EfiInitCacheUnspecified
209 } EFI_INIT_CACHE_TYPE
;
212 /// Embedded cache init extended data
215 EFI_STATUS_CODE_DATA DataHeader
;
217 EFI_INIT_CACHE_TYPE Type
;
218 } EFI_CACHE_INIT_DATA
;
221 /// Processor Disabled Extended Error Data
222 /// This structure provides details as to why and how the computing unit was disabled. The causes
223 /// should cover the typical reasons a processor would be disabled. How the processor was disabled is
224 /// important because there are distinct differences between hardware and software disabling.
228 /// The data header identifying the data.
230 EFI_STATUS_CODE_DATA DataHeader
;
232 /// The reason for disabling the processor.
236 /// TRUE if the processor is disabled via software means such as not listing it in the ACPI tables.
237 /// Such a processor will respond to Interprocessor Interrupts (IPIs). FALSE if the processor is hardware
238 /// disabled, which means it is invisible to software and will not respond to IPIs.
240 BOOLEAN SoftwareDisabled
;
241 } EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA
;
244 /// Memory Error Operation Definition
246 typedef UINT8 EFI_MEMORY_ERROR_OPERATION
;
249 /// Memory Error Granularity Definition
251 typedef UINT8 EFI_MEMORY_ERROR_GRANULARITY
;
254 /// This structure provides specific details about the memory error that was detected. It provides
255 /// enough information so that consumers can identify the exact failure and provides enough
256 /// information to enable corrective action if necessary.
260 /// The data header identifying the data.
262 EFI_STATUS_CODE_DATA DataHeader
;
264 /// The error granularity type.
266 EFI_MEMORY_ERROR_GRANULARITY Granularity
;
268 /// The operation that resulted in the error being detected.
270 EFI_MEMORY_ERROR_OPERATION Operation
;
272 /// The error syndrome, vendor-specific ECC syndrome, or CRC data associated with
273 /// the error. If unknown, should be initialized to 0.
274 /// Inconsistent with specification here:
275 /// This field in StatusCodes spec0.9 is defined as UINT32, keep code unchanged.
279 /// The physical address of the error.
281 EFI_PHYSICAL_ADDRESS Address
;
283 /// The range, in bytes, within which the error address can be determined.
286 } EFI_MEMORY_EXTENDED_ERROR_DATA
;
289 /// This extended data provides some context that consumers can use to locate a DIMM within the
290 /// overall memory scheme.
294 /// The data header identifying the data.
296 EFI_STATUS_CODE_DATA DataHeader
;
298 /// The memory array number.
302 /// The device number within that Array.
305 } EFI_STATUS_CODE_DIMM_NUMBER
;
308 /// Memory Module Mismatch Extended Error Data
312 /// The data header identifying the data.
314 EFI_STATUS_CODE_DATA DataHeader
;
316 /// The instance number of the memory module that does not match.
318 EFI_STATUS_CODE_DIMM_NUMBER Instance
;
319 } EFI_MEMORY_MODULE_MISMATCH_ERROR_DATA
;
322 /// Memory Range Extended Data
323 /// This extended data may be used to convey the specifics of a memory range. Ranges are specified
324 /// with a start address and a length.
328 /// The data header identifying the data.
330 EFI_STATUS_CODE_DATA DataHeader
;
332 /// The starting address of the memory range.
334 EFI_PHYSICAL_ADDRESS Start
;
336 /// The length in bytes of the memory range.
338 EFI_PHYSICAL_ADDRESS Length
;
339 } EFI_MEMORY_RANGE_EXTENDED_DATA
;
342 /// Extended Error Data for Assert
343 /// The data indicates the location of the assertion that failed in the source code. This information
344 /// includes the file name and line number that are necessary to find the failing assertion in source code.
348 /// The data header identifying the data.
350 EFI_STATUS_CODE_DATA DataHeader
;
352 /// The line number of the source file where the fault was generated.
356 /// The size in bytes of FileName.
360 /// A pointer to a NULL-terminated ASCII or Unicode string that represents the file
361 /// name of the source file where the fault was generated.
363 EFI_STATUS_CODE_STRING_DATA
*FileName
;
364 } EFI_DEBUG_ASSERT_DATA
;
367 /// System Context Data EBC/IA32/IPF
370 EFI_SYSTEM_CONTEXT_EBC SystemContextEbc
;
371 EFI_SYSTEM_CONTEXT_IA32 SystemContextIa32
;
372 EFI_SYSTEM_CONTEXT_IPF SystemContextIpf
;
373 } EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT
;
376 /// This extended data allows the processor context that is present at the time of the exception to be
377 /// reported with the exception. The format and contents of the context data varies depending on the
378 /// processor architecture.
382 /// The data header identifying the data.
384 EFI_STATUS_CODE_DATA DataHeader
;
386 /// The system context.
388 EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT Context
;
389 } EFI_STATUS_CODE_EXCEP_EXTENDED_DATA
;
392 /// This extended data records information about a Start() function call. Start() is a member of
393 /// the EFI 1.10 Driver Binding Protocol.
397 /// The data header identifying the data.
399 EFI_STATUS_CODE_DATA DataHeader
;
401 /// The controller handle.
403 EFI_HANDLE ControllerHandle
;
405 /// The driver binding handle.
407 EFI_HANDLE DriverBindingHandle
;
409 /// The size of the RemainingDevicePath. It is zero if the Start() function is
410 /// called with RemainingDevicePath = NULL.
412 UINT16 DevicePathSize
;
414 /// Matches the RemainingDevicePath parameter being passed to the Start()
415 /// function. Note that this parameter is the variable-length device path and not a pointer
416 /// to the device path.
418 UINT8
*RemainingDevicePath
;
419 } EFI_STATUS_CODE_START_EXTENDED_DATA
;
422 /// Legacy Oprom extended data
423 /// The device handle and ROM image base can be used by consumers to determine which option
424 /// ROM failed. Due to the black-box nature of legacy option ROMs, the amount of information that
425 /// can be obtained may be limited.
429 /// The data header identifying the data.
431 EFI_STATUS_CODE_DATA DataHeader
;
433 /// The handle corresponding to the device that this legacy option ROM is being invoked.
435 EFI_HANDLE DeviceHandle
;
437 /// The base address of the shadowed legacy ROM image.
438 /// May or may not point to the shadow RAM area.
440 EFI_PHYSICAL_ADDRESS RomImageBase
;
441 } EFI_LEGACY_OPROM_EXTENDED_DATA
;
445 extern EFI_GUID gEfiStatusCodeSpecificDataGuid
;
448 // EFI_COMPUTING_UNIT_MISMATCH_ATTRIBUTES
449 // All other attributes are reserved for future use and
450 // must be initialized to 0.
452 #define EFI_COMPUTING_UNIT_MISMATCH_SPEED 0x0001
453 #define EFI_COMPUTING_UNIT_MISMATCH_FSB_SPEED 0x0002
454 #define EFI_COMPUTING_UNIT_MISMATCH_FAMILY 0x0004
455 #define EFI_COMPUTING_UNIT_MISMATCH_MODEL 0x0008
456 #define EFI_COMPUTING_UNIT_MISMATCH_STEPPING 0x0010
457 #define EFI_COMPUTING_UNIT_MISMATCH_CACHE_SIZE 0x0020
458 #define EFI_COMPUTING_UNIT_MISMATCH_OEM1 0x1000
459 #define EFI_COMPUTING_UNIT_MISMATCH_OEM2 0x2000
460 #define EFI_COMPUTING_UNIT_MISMATCH_OEM3 0x4000
461 #define EFI_COMPUTING_UNIT_MISMATCH_OEM4 0x8000
466 // Memory Error Granularities
468 #define EFI_MEMORY_ERROR_OTHER 0x01
469 #define EFI_MEMORY_ERROR_UNKNOWN 0x02
470 #define EFI_MEMORY_ERROR_DEVICE 0x03
471 #define EFI_MEMORY_ERROR_PARTITION 0x04
474 // Memory Error Operations
476 #define EFI_MEMORY_OPERATION_OTHER 0x01
477 #define EFI_MEMORY_OPERATION_UNKNOWN 0x02
478 #define EFI_MEMORY_OPERATION_READ 0x03
479 #define EFI_MEMORY_OPERATION_WRITE 0x04
480 #define EFI_MEMORY_OPERATION_PARTIAL_WRITE 0x05
483 // Define shorthands to describe Group Operations
484 // Many memory init operations are essentially group
487 /// A shorthand to describe that the operation is performed
488 /// on multiple devices within the array
490 #define EFI_MULTIPLE_MEMORY_DEVICE_OPERATION 0xfffe
492 /// A shorthand to describe that the operation is performed on all devices within the array
494 #define EFI_ALL_MEMORY_DEVICE_OPERATION 0xffff
496 /// A shorthand to describe that the operation is performed on multiple arrays
498 #define EFI_MULTIPLE_MEMORY_ARRAY_OPERATION 0xfffe
500 /// A shorthand to describe that the operation is performed on all the arrays
502 #define EFI_ALL_MEMORY_ARRAY_OPERATION 0xffff