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