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