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