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