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