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