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