]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Guid/StatusCodeDataTypeId.h
991cd2d1db12db6b81f60dd1af9e681d68d6ba8a
[mirror_edk2.git] / IntelFrameworkPkg / 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 Module Name: StatusCodeDataTypeId.h
14
15 @par Revision Reference:
16 GUIDs defined in Status Codes Specification 0.92
17
18 **/
19
20 #ifndef __STATUS_CODE_DATA_TYPE_ID_GUID_H__
21 #define __STATUS_CODE_DATA_TYPE_ID_GUID_H__
22
23 #include <Framework/StatusCode.h>
24 #include <Protocol/DebugSupport.h>
25 #include <Protocol/FrameworkHii.h>
26
27 //////////////////////////////////////////////////////////////////////////////////////////
28 // String Data Type defintion. This is part of Status Code Specification
29 //////////////////////////////////////////////////////////////////////////////////////////
30 #define EFI_STATUS_CODE_DATA_TYPE_STRING_GUID \
31 { 0x92D11080, 0x496F, 0x4D95, { 0xBE, 0x7E, 0x03, 0x74, 0x88, 0x38, 0x2B, 0x0A } }
32
33 #pragma pack(1)
34
35 typedef enum {
36 EfiStringAscii, ///< A NULL-terminated ASCII string.
37 EfiStringUnicode, ///< A double NULL-terminated Unicode string.
38 EfiStringToken ///< An EFI_STATUS_CODE_STRING_TOKEN representing the string.
39 ///< The actual string can be obtained by querying the HII Database.
40 } EFI_STRING_TYPE;
41
42 typedef struct {
43 FRAMEWORK_EFI_HII_HANDLE Handle; ///< The HII handle of the string pack, which can be
44 ///< used to retrieve the string. It is a dynamic value
45 ///< that may not be the same for different boots.
46 STRING_REF Token; ///< When combined with the HII handle, the string
47 ///< token can be used to retrieve the string.
48
49 } EFI_STATUS_CODE_STRING_TOKEN;
50
51 typedef union {
52 CHAR8 *Ascii; ///< ASCII formatted string.
53 CHAR16 *Unicode; ///< Unicode formatted string.
54 EFI_STATUS_CODE_STRING_TOKEN Hii; ///< HII handle/token pair.
55 } EFI_STATUS_CODE_STRING;
56
57 typedef struct {
58 EFI_STATUS_CODE_DATA DataHeader; ///< The data header identifying the data.
59 EFI_STRING_TYPE StringType; ///< Specifies if the string is ASCII or Unicode.
60 EFI_STATUS_CODE_STRING String; ///< A pointer to a null-terminated ASCII or Unicode string.
61 } EFI_STATUS_CODE_STRING_DATA;
62 #pragma pack()
63
64 extern EFI_GUID gEfiStatusCodeDataTypeStringGuid;
65
66
67 //////////////////////////////////////////////////////////////////////////////////////////
68 // Special Data Type defintion. This is part of Status Code Specification
69 //////////////////////////////////////////////////////////////////////////////////////////
70 #define EFI_STATUS_CODE_SPECIFIC_DATA_GUID \
71 { 0x335984bd, 0xe805, 0x409a, { 0xb8, 0xf8, 0xd2, 0x7e, 0xce, 0x5f, 0xf7, 0xa6 } }
72
73 #pragma pack(1)
74
75 ///
76 /// Device handle Extended Data. Used for many
77 /// errors and progress codes to point to the device.
78 ///
79 typedef struct {
80 EFI_STATUS_CODE_DATA DataHeader;
81 EFI_HANDLE Handle;
82 } EFI_DEVICE_HANDLE_EXTENDED_DATA;
83
84 ///
85 /// Extended data about the device path, which is used for many errors and
86 /// progress codes to point to the device.
87 ///
88 typedef struct {
89 EFI_STATUS_CODE_DATA DataHeader;
90 UINT8 *DevicePath;
91 } EFI_DEVICE_PATH_EXTENDED_DATA;
92
93 ///
94 /// This structure defines extended data describing a PCI resource allocation error.
95 ///
96 typedef struct {
97 EFI_STATUS_CODE_DATA DataHeader;
98 UINT32 Bar;
99 UINT16 DevicePathSize;
100 UINT16 ReqResSize;
101 UINT16 AllocResSize;
102 UINT8 *DevicePath;
103 UINT8 *ReqRes;
104 UINT8 *AllocRes;
105 } EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA;
106
107 ///
108 /// This structure provides the voltage at the time of error. It also provides
109 /// the threshold value indicating the minimum or maximum voltage that is considered
110 /// an error. If the voltage is less then the threshold, the error indicates that the
111 /// voltage fell below the minimum acceptable value. If the voltage is greater then the threshold,
112 /// the error indicates that the voltage rose above the maximum acceptable value.
113 ///
114 typedef struct {
115 ///
116 /// The data header identifying the data.
117 ///
118 EFI_STATUS_CODE_DATA DataHeader;
119 ///
120 /// The voltage value at the time of the error.
121 ///
122 EFI_EXP_BASE10_DATA Voltage;
123 ///
124 /// The voltage threshold.
125 ///
126 EFI_EXP_BASE10_DATA Threshold;
127 } EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA;
128
129 ///
130 /// Microcode Update Extended Error Data
131 ///
132 typedef struct {
133 ///
134 /// The data header identifying the data.
135 ///
136 EFI_STATUS_CODE_DATA DataHeader;
137 ///
138 /// The version of the microcode update from the header.
139 ///
140 UINT32 Version;
141 } EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA;
142
143 ///
144 /// Asynchronous Timer Extended Error Data
145 /// The timer limit provides the timeout value of the timer prior to expiration.
146 ///
147 typedef struct {
148 ///
149 /// The data header identifying the data.
150 ///
151 EFI_STATUS_CODE_DATA DataHeader;
152 ///
153 /// The number of seconds that the computing unit timer was configured to expire.
154 ///
155 EFI_EXP_BASE10_DATA TimerLimit;
156 } EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA;
157
158 ///
159 /// Host Processor Mismatch Extended Error Data
160 /// This provides information to indicate which processors mismatch, and how they mismatch. The
161 /// status code contains the instance number of the processor that is in error. This structure's
162 /// Instance indicates the second processor that does not match. This differentiation allows the
163 /// consumer to determine which two processors do not match. The Attributes indicate what
164 /// mismatch is being reported. Because Attributes is a bit field, more than one mismatch can be
165 /// reported with one error code.
166 ///
167 typedef struct {
168 ///
169 /// The data header identifying the data.
170 ///
171 EFI_STATUS_CODE_DATA DataHeader;
172 ///
173 /// The unit number of the computing unit that does not match.
174 ///
175 UINT32 Instance;
176 ///
177 /// The attributes describing the failure.
178 ///
179 UINT16 Attributes;
180 } EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA;
181
182 ///
183 /// Thermal Extended Error Data
184 /// This structure provides the temperature at the time of error. It also provides the threshold value
185 /// indicating the minimum temperature that is considered an error.
186 ///
187 typedef struct {
188 ///
189 /// The data header identifying the data.
190 ///
191 EFI_STATUS_CODE_DATA DataHeader;
192 ///
193 /// The thermal value at the time of the error.
194 ///
195 EFI_EXP_BASE10_DATA Temperature;
196 ///
197 /// The thermal threshold.
198 ///
199 EFI_EXP_BASE10_DATA Threshold;
200 } EFI_COMPUTING_UNIT_THERMAL_ERROR_DATA;
201
202 //
203 // Valid cache types
204 //
205 typedef enum {
206 EfiInitCacheDataOnly,
207 EfiInitCacheInstrOnly,
208 EfiInitCacheBoth,
209 EfiInitCacheUnspecified
210 } EFI_INIT_CACHE_TYPE;
211
212 ///
213 /// Embedded cache init extended data
214 ///
215 typedef struct {
216 EFI_STATUS_CODE_DATA DataHeader;
217 UINT32 Level;
218 EFI_INIT_CACHE_TYPE Type;
219 } EFI_CACHE_INIT_DATA;
220
221 ///
222 /// Processor Disabled Extended Error Data
223 /// This structure provides details as to why and how the computing unit was disabled. The causes
224 /// should cover the typical reasons a processor would be disabled. How the processor was disabled is
225 /// important because there are distinct differences between hardware and software disabling.
226 ///
227 typedef struct {
228 ///
229 /// The data header identifying the data.
230 ///
231 EFI_STATUS_CODE_DATA DataHeader;
232 ///
233 /// The reason for disabling the processor.
234 ///
235 UINT32 Cause;
236 ///
237 /// TRUE if the processor is disabled via software means such as not listing it in the ACPI tables.
238 /// Such a processor will respond to Interprocessor Interrupts (IPIs). FALSE if the processor is hardware
239 /// disabled, which means it is invisible to software and will not respond to IPIs.
240 ///
241 BOOLEAN SoftwareDisabled;
242 } EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA;
243
244 ///
245 /// Memory Error Operation Definition
246 ///
247 typedef UINT8 EFI_MEMORY_ERROR_OPERATION;
248
249 ///
250 /// Memory Error Granularity Definition
251 ///
252 typedef UINT8 EFI_MEMORY_ERROR_GRANULARITY;
253
254 ///
255 /// This structure provides specific details about the memory error that was detected. It provides
256 /// enough information so that consumers can identify the exact failure and provides enough
257 /// information to enable corrective action if necessary.
258 ///
259 typedef struct {
260 ///
261 /// The data header identifying the data.
262 ///
263 EFI_STATUS_CODE_DATA DataHeader;
264 ///
265 /// The error granularity type.
266 ///
267 EFI_MEMORY_ERROR_GRANULARITY Granularity;
268 ///
269 /// The operation that resulted in the error being detected.
270 ///
271 EFI_MEMORY_ERROR_OPERATION Operation;
272 ///
273 /// The error syndrome, vendor-specific ECC syndrome, or CRC data associated with
274 /// the error. If unknown, should be initialized to 0.
275 /// Inconsistent with specification here:
276 /// This field in StatusCodes spec0.9 is defined as UINT32, keep code unchanged.
277 ///
278 UINTN Syndrome;
279 ///
280 /// The physical address of the error.
281 ///
282 EFI_PHYSICAL_ADDRESS Address;
283 ///
284 /// The range, in bytes, within which the error address can be determined.
285 ///
286 UINTN Resolution;
287 } EFI_MEMORY_EXTENDED_ERROR_DATA;
288
289 ///
290 /// This extended data provides some context that consumers can use to locate a DIMM within the
291 /// overall memory scheme.
292 ///
293 typedef struct {
294 ///
295 /// The data header identifying the data.
296 ///
297 EFI_STATUS_CODE_DATA DataHeader;
298 ///
299 /// The memory array number.
300 ///
301 UINT16 Array;
302 ///
303 /// The device number within that Array.
304 ///
305 UINT16 Device;
306 } EFI_STATUS_CODE_DIMM_NUMBER;
307
308 ///
309 /// Memory Module Mismatch Extended Error Data
310 ///
311 typedef struct {
312 ///
313 /// The data header identifying the data.
314 ///
315 EFI_STATUS_CODE_DATA DataHeader;
316 ///
317 /// The instance number of the memory module that does not match.
318 ///
319 EFI_STATUS_CODE_DIMM_NUMBER Instance;
320 } EFI_MEMORY_MODULE_MISMATCH_ERROR_DATA;
321
322 ///
323 /// Memory Range Extended Data
324 /// This extended data may be used to convey the specifics of a memory range. Ranges are specified
325 /// with a start address and a length.
326 ///
327 typedef struct {
328 ///
329 /// The data header identifying the data.
330 ///
331 EFI_STATUS_CODE_DATA DataHeader;
332 ///
333 /// The starting address of the memory range.
334 ///
335 EFI_PHYSICAL_ADDRESS Start;
336 ///
337 /// The length in bytes of the memory range.
338 ///
339 EFI_PHYSICAL_ADDRESS Length;
340 } EFI_MEMORY_RANGE_EXTENDED_DATA;
341
342 ///
343 /// Extended Error Data for Assert
344 /// The data indicates the location of the assertion that failed in the source code. This information
345 /// includes the file name and line number that are necessary to find the failing assertion in source code.
346 ///
347 typedef struct {
348 ///
349 /// The data header identifying the data.
350 ///
351 EFI_STATUS_CODE_DATA DataHeader;
352 ///
353 /// The line number of the source file where the fault was generated.
354 ///
355 UINT32 LineNumber;
356 ///
357 /// The size in bytes of FileName.
358 ///
359 UINT32 FileNameSize;
360 ///
361 /// A pointer to a NULL-terminated ASCII or Unicode string that represents the file
362 /// name of the source file where the fault was generated.
363 ///
364 EFI_STATUS_CODE_STRING_DATA *FileName;
365 } EFI_DEBUG_ASSERT_DATA;
366
367 ///
368 /// System Context Data EBC/IA32/IPF
369 ///
370 typedef union {
371 EFI_SYSTEM_CONTEXT_EBC SystemContextEbc;
372 EFI_SYSTEM_CONTEXT_IA32 SystemContextIa32;
373 EFI_SYSTEM_CONTEXT_IPF SystemContextIpf;
374 } EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT;
375
376 ///
377 /// This extended data allows the processor context that is present at the time of the exception to be
378 /// reported with the exception. The format and contents of the context data varies depending on the
379 /// processor architecture.
380 ///
381 typedef struct {
382 ///
383 /// The data header identifying the data.
384 ///
385 EFI_STATUS_CODE_DATA DataHeader;
386 ///
387 /// The system context.
388 ///
389 EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT Context;
390 } EFI_STATUS_CODE_EXCEP_EXTENDED_DATA;
391
392 ///
393 /// This extended data records information about a Start() function call. Start() is a member of
394 /// the EFI 1.10 Driver Binding Protocol.
395 ///
396 typedef struct {
397 ///
398 /// The data header identifying the data.
399 ///
400 EFI_STATUS_CODE_DATA DataHeader;
401 ///
402 /// The controller handle.
403 ///
404 EFI_HANDLE ControllerHandle;
405 ///
406 /// The driver binding handle.
407 ///
408 EFI_HANDLE DriverBindingHandle;
409 ///
410 /// The size of the RemainingDevicePath. It is zero if the Start() function is
411 /// called with RemainingDevicePath = NULL.
412 ///
413 UINT16 DevicePathSize;
414 ///
415 /// Matches the RemainingDevicePath parameter being passed to the Start()
416 /// function. Note that this parameter is the variable-length device path and not a pointer
417 /// to the device path.
418 ///
419 UINT8 *RemainingDevicePath;
420 } EFI_STATUS_CODE_START_EXTENDED_DATA;
421
422 ///
423 /// Legacy Oprom extended data
424 /// The device handle and ROM image base can be used by consumers to determine which option
425 /// ROM failed. Due to the black-box nature of legacy option ROMs, the amount of information that
426 /// can be obtained may be limited.
427 ///
428 typedef struct {
429 ///
430 /// The data header identifying the data.
431 ///
432 EFI_STATUS_CODE_DATA DataHeader;
433 ///
434 /// The handle corresponding to the device that this legacy option ROM is being invoked.
435 ///
436 EFI_HANDLE DeviceHandle;
437 ///
438 /// The base address of the shadowed legacy ROM image.
439 /// May or may not point to the shadow RAM area.
440 ///
441 EFI_PHYSICAL_ADDRESS RomImageBase;
442 } EFI_LEGACY_OPROM_EXTENDED_DATA;
443
444 #pragma pack()
445
446 extern EFI_GUID gEfiStatusCodeSpecificDataGuid;
447
448 //
449 // EFI_COMPUTING_UNIT_MISMATCH_ATTRIBUTES
450 // All other attributes are reserved for future use and
451 // must be initialized to 0.
452 //
453 #define EFI_COMPUTING_UNIT_MISMATCH_SPEED 0x0001
454 #define EFI_COMPUTING_UNIT_MISMATCH_FSB_SPEED 0x0002
455 #define EFI_COMPUTING_UNIT_MISMATCH_FAMILY 0x0004
456 #define EFI_COMPUTING_UNIT_MISMATCH_MODEL 0x0008
457 #define EFI_COMPUTING_UNIT_MISMATCH_STEPPING 0x0010
458 #define EFI_COMPUTING_UNIT_MISMATCH_CACHE_SIZE 0x0020
459 #define EFI_COMPUTING_UNIT_MISMATCH_OEM1 0x1000
460 #define EFI_COMPUTING_UNIT_MISMATCH_OEM2 0x2000
461 #define EFI_COMPUTING_UNIT_MISMATCH_OEM3 0x4000
462 #define EFI_COMPUTING_UNIT_MISMATCH_OEM4 0x8000
463
464
465
466 //
467 // Memory Error Granularities
468 //
469 #define EFI_MEMORY_ERROR_OTHER 0x01
470 #define EFI_MEMORY_ERROR_UNKNOWN 0x02
471 #define EFI_MEMORY_ERROR_DEVICE 0x03
472 #define EFI_MEMORY_ERROR_PARTITION 0x04
473
474 //
475 // Memory Error Operations
476 //
477 #define EFI_MEMORY_OPERATION_OTHER 0x01
478 #define EFI_MEMORY_OPERATION_UNKNOWN 0x02
479 #define EFI_MEMORY_OPERATION_READ 0x03
480 #define EFI_MEMORY_OPERATION_WRITE 0x04
481 #define EFI_MEMORY_OPERATION_PARTIAL_WRITE 0x05
482
483 //
484 // Define shorthands to describe Group Operations
485 // Many memory init operations are essentially group
486 // operations.
487
488 /// A shorthand to describe that the operation is performed
489 /// on multiple devices within the array
490 ///
491 #define EFI_MULTIPLE_MEMORY_DEVICE_OPERATION 0xfffe
492 ///
493 /// A shorthand to describe that the operation is performed on all devices within the array
494 ///
495 #define EFI_ALL_MEMORY_DEVICE_OPERATION 0xffff
496 ///
497 /// A shorthand to describe that the operation is performed on multiple arrays
498 ///
499 #define EFI_MULTIPLE_MEMORY_ARRAY_OPERATION 0xfffe
500 ///
501 /// A shorthand to describe that the operation is performed on all the arrays
502 ///
503 #define EFI_ALL_MEMORY_ARRAY_OPERATION 0xffff
504
505 #endif