1 /** @file 2 GUID used to identify id for the caller who is initiating the Status Code. 3 4 Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR> 5 SPDX-License-Identifier: BSD-2-Clause-Patent 6 7 @par Revision Reference: 8 These GUIDs and structures are defined in UEFI Platform Initialization Specification 1.2 9 Volume 3: Shared Architectural Elements 10 11 **/ 12 13 #ifndef __PI_STATUS_CODE_DATA_TYPE_ID_GUID_H__ 14 #define __PI_STATUS_CODE_DATA_TYPE_ID_GUID_H__ 15 16 #include <PiDxe.h> 17 #include <Protocol/DebugSupport.h> 18 19 /// 20 /// Global ID for the EFI_STATUS_CODE_STRING structure 21 /// 22 #define EFI_STATUS_CODE_DATA_TYPE_STRING_GUID \ 23 { 0x92D11080, 0x496F, 0x4D95, { 0xBE, 0x7E, 0x03, 0x74, 0x88, 0x38, 0x2B, 0x0A } } 24 25 typedef enum { 26 /// 27 /// A NULL-terminated ASCII string. 28 /// 29 EfiStringAscii, 30 /// 31 /// A double NULL-terminated Unicode string. 32 /// 33 EfiStringUnicode, 34 /// 35 /// An EFI_STATUS_CODE_STRING_TOKEN representing the string. The actual 36 /// string can be obtained by querying the HII Database 37 /// 38 EfiStringToken 39 } EFI_STRING_TYPE; 40 41 /// 42 /// Specifies the format of the data in EFI_STATUS_CODE_STRING_DATA.String. 43 /// 44 typedef struct { 45 /// 46 /// The HII package list which contains the string. Handle is a dynamic value that may 47 /// not be the same for different boots. Type EFI_HII_HANDLE is defined in 48 /// EFI_HII_DATABASE_PROTOCOL.NewPackageList() in the UEFI Specification. 49 /// 50 EFI_HII_HANDLE Handle; 51 /// 52 /// When combined with Handle, the string token can be used to retrieve the string. 53 /// Type EFI_STRING_ID is defined in EFI_IFR_OP_HEADER in the UEFI Specification. 54 /// 55 EFI_STRING_ID Token; 56 } EFI_STATUS_CODE_STRING_TOKEN; 57 58 typedef union { 59 /// 60 /// ASCII formatted string. 61 /// 62 CHAR8 *Ascii; 63 /// 64 /// Unicode formatted string. 65 /// 66 CHAR16 *Unicode; 67 /// 68 /// HII handle/token pair. 69 /// 70 EFI_STATUS_CODE_STRING_TOKEN Hii; 71 } EFI_STATUS_CODE_STRING; 72 73 /// 74 /// This data type defines a string type of extended data. A string can accompany 75 /// any status code. The string can provide additional information about the 76 /// status code. The string can be ASCII, Unicode, or a Human Interface Infrastructure 77 /// (HII) token/GUID pair. 78 /// 79 typedef struct { 80 /// 81 /// The data header identifying the data. DataHeader.HeaderSize should be 82 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 83 /// sizeof (EFI_STATUS_CODE_STRING_DATA) - HeaderSize, and 84 /// DataHeader.Type should be 85 /// EFI_STATUS_CODE_DATA_TYPE_STRING_GUID. 86 /// 87 EFI_STATUS_CODE_DATA DataHeader; 88 /// 89 /// Specifies the format of the data in String. 90 /// 91 EFI_STRING_TYPE StringType; 92 /// 93 /// A pointer to the extended data. The data follows the format specified by 94 /// StringType. 95 /// 96 EFI_STATUS_CODE_STRING String; 97 } EFI_STATUS_CODE_STRING_DATA; 98 99 extern EFI_GUID gEfiStatusCodeDataTypeStringGuid; 100 101 /// 102 /// Global ID for the following structures: 103 /// - EFI_DEVICE_PATH_EXTENDED_DATA 104 /// - EFI_DEVICE_HANDLE_EXTENDED_DATA 105 /// - EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA 106 /// - EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA 107 /// - EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA 108 /// - EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA 109 /// - EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA 110 /// - EFI_MEMORY_RANGE_EXTENDED_DATA 111 /// - EFI_DEBUG_ASSERT_DATA 112 /// - EFI_STATUS_CODE_EXCEP_EXTENDED_DATA 113 /// - EFI_STATUS_CODE_START_EXTENDED_DATA 114 /// - EFI_LEGACY_OPROM_EXTENDED_DATA 115 /// - EFI_RETURN_STATUS_EXTENDED_DATA 116 /// 117 #define EFI_STATUS_CODE_SPECIFIC_DATA_GUID \ 118 { 0x335984bd, 0xe805, 0x409a, { 0xb8, 0xf8, 0xd2, 0x7e, 0xce, 0x5f, 0xf7, 0xa6 } } 119 120 /// 121 /// Extended data about the device path, which is used for many errors and 122 /// progress codes to point to the device. 123 /// 124 /// The device path is used to point to the physical device in case there is more than one device 125 /// belonging to the same subclass. For example, the system may contain two USB keyboards and one 126 /// PS/2* keyboard. The driver that parses the status code can use the device path extended data to 127 /// differentiate between the three. The index field is not useful in this case because there is no standard 128 /// numbering convention. Device paths are preferred over using device handles because device handles 129 /// for a given device can change from one boot to another and do not mean anything beyond Boot 130 /// Services time. In certain cases, the bus driver may not create a device handle for a given device if it 131 /// detects a critical error. In these cases, the device path extended data can be used to refer to the 132 /// device, but there may not be any device handles with an instance of 133 /// EFI_DEVICE_PATH_PROTOCOL that matches DevicePath. The variable device path structure 134 /// is included in this structure to make it self sufficient. 135 /// 136 typedef struct { 137 /// 138 /// The data header identifying the data. DataHeader.HeaderSize should be 139 /// sizeof (EFI_STATUS_CODE_DATA). DataHeader.Size should be the size 140 /// of variable-length DevicePath, and DataHeader.Size is zero for a virtual 141 /// device that does not have a device path. DataHeader.Type should be 142 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 143 /// 144 EFI_STATUS_CODE_DATA DataHeader; 145 /// 146 /// The device path to the controller or the hardware device. Note that this parameter is a 147 /// variable-length device path structure and not a pointer to such a structure. This structure is 148 /// populated only if it is a physical device. For virtual devices, the Size field in DataHeader 149 /// is set to zero and this field is not populated. 150 /// 151 // EFI_DEVICE_PATH_PROTOCOL DevicePath; 152 } EFI_DEVICE_PATH_EXTENDED_DATA; 153 154 /// 155 /// Device handle Extended Data. Used for many 156 /// errors and progress codes to point to the device. 157 /// 158 /// The handle of the device with which the progress or error code is associated. The handle is 159 /// guaranteed to be accurate only at the time the status code is reported. Handles are dynamic entities 160 /// between boots, so handles cannot be considered to be valid if the system has reset subsequent to the 161 /// status code being reported. Handles may be used to determine a wide variety of useful information 162 /// about the source of the status code. 163 /// 164 typedef struct { 165 /// 166 /// The data header identifying the data. DataHeader.HeaderSize should be 167 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 168 /// sizeof (EFI_DEVICE_HANDLE_EXTENDED_DATA) - HeaderSize, and 169 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 170 /// 171 EFI_STATUS_CODE_DATA DataHeader; 172 /// 173 /// The device handle. 174 /// 175 EFI_HANDLE Handle; 176 } EFI_DEVICE_HANDLE_EXTENDED_DATA; 177 178 /// 179 /// This structure defines extended data describing a PCI resource allocation error. 180 /// 181 /// @par Note: 182 /// The following structure contains variable-length fields and cannot be defined as a C-style 183 /// structure. 184 /// 185 /// This extended data conveys details for a PCI resource allocation failure error. See the PCI 186 /// specification and the ACPI specification for details on PCI resource allocations and the format for 187 /// resource descriptors. This error does not detail why the resource allocation failed. It may be due to a 188 /// bad resource request or a lack of available resources to satisfy a valid request. The variable device 189 /// path structure and the resource structures are included in this structure to make it self sufficient. 190 /// 191 typedef struct { 192 /// 193 /// The data header identifying the data. DataHeader.HeaderSize should be sizeof 194 /// (EFI_STATUS_CODE_DATA), DataHeader.Size should be 195 /// (DevicePathSize + DevicePathSize + DevicePathSize + 196 /// sizeof(UINT32) + 3 * sizeof (UINT16) ), and DataHeader.Type 197 /// should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 198 /// 199 EFI_STATUS_CODE_DATA DataHeader; 200 /// 201 /// The PCI BAR. Applicable only for PCI devices. Ignored for all other devices. 202 /// 203 UINT32 Bar; 204 /// 205 /// DevicePathSize should be zero if it is a virtual device that is not associated with 206 /// a device path. Otherwise, this parameter is the length of the variable-length 207 /// DevicePath. 208 /// 209 UINT16 DevicePathSize; 210 /// 211 /// Represents the size the ReqRes parameter. ReqResSize should be zero if the 212 /// requested resources are not provided as a part of extended data. 213 /// 214 UINT16 ReqResSize; 215 /// 216 /// Represents the size the AllocRes parameter. AllocResSize should be zero if the 217 /// allocated resources are not provided as a part of extended data. 218 /// 219 UINT16 AllocResSize; 220 /// 221 /// The device path to the controller or the hardware device that did not get the requested 222 /// resources. Note that this parameter is the variable-length device path structure and not 223 /// a pointer to this structure. 224 /// 225 // EFI_DEVICE_PATH_PROTOCOL DevicePath; 226 /// 227 /// The requested resources in the format of an ACPI 2.0 resource descriptor. This 228 /// parameter is not a pointer; it is the complete resource descriptor. 229 /// 230 // UINT8 ReqRes[]; 231 /// 232 /// The allocated resources in the format of an ACPI 2.0 resource descriptor. This 233 /// parameter is not a pointer; it is the complete resource descriptor. 234 /// 235 // UINT8 AllocRes[]; 236 } EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA; 237 238 /// 239 /// This structure provides a calculation for base-10 representations. 240 /// 241 /// Not consistent with PI 1.2 Specification. 242 /// This data type is not defined in the PI 1.2 Specification, but is 243 /// required by several of the other data structures in this file. 244 /// 245 typedef struct { 246 /// 247 /// The INT16 number by which to multiply the base-2 representation. 248 /// 249 INT16 Value; 250 /// 251 /// The INT16 number by which to raise the base-2 calculation. 252 /// 253 INT16 Exponent; 254 } EFI_EXP_BASE10_DATA; 255 256 /// 257 /// This structure provides the voltage at the time of error. It also provides 258 /// the threshold value indicating the minimum or maximum voltage that is considered 259 /// an error. If the voltage is less then the threshold, the error indicates that the 260 /// voltage fell below the minimum acceptable value. If the voltage is greater then the threshold, 261 /// the error indicates that the voltage rose above the maximum acceptable value. 262 /// 263 typedef struct { 264 /// 265 /// The data header identifying the data. DataHeader.HeaderSize should be 266 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 267 /// sizeof (EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA) - 268 /// HeaderSize, and DataHeader.Type should be 269 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 270 /// 271 EFI_STATUS_CODE_DATA DataHeader; 272 /// 273 /// The voltage value at the time of the error. 274 /// 275 EFI_EXP_BASE10_DATA Voltage; 276 /// 277 /// The voltage threshold. 278 /// 279 EFI_EXP_BASE10_DATA Threshold; 280 } EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA; 281 282 /// 283 /// Microcode Update Extended Error Data 284 /// 285 typedef struct { 286 /// 287 /// The data header identifying the data. DataHeader.HeaderSize should be 288 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 289 /// sizeof (EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA) - 290 /// HeaderSize, and DataHeader.Type should be 291 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 292 /// 293 EFI_STATUS_CODE_DATA DataHeader; 294 /// 295 /// The version of the microcode update from the header. 296 /// 297 UINT32 Version; 298 } EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA; 299 300 /// 301 /// This structure provides details about the computing unit timer expiration error. 302 /// The timer limit provides the timeout value of the timer prior to expiration. 303 /// 304 typedef struct { 305 /// 306 /// The data header identifying the data. DataHeader.HeaderSize should be 307 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 308 /// sizeof (EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA) - 309 /// HeaderSize, and DataHeader.Type should be 310 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 311 /// 312 EFI_STATUS_CODE_DATA DataHeader; 313 /// 314 /// The number of seconds that the computing unit timer was configured to expire. 315 /// 316 EFI_EXP_BASE10_DATA TimerLimit; 317 } EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA; 318 319 /// 320 /// Attribute bits for EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA.Attributes 321 /// All other attributes are reserved for future use and must be initialized to 0. 322 /// 323 ///@{ 324 #define EFI_COMPUTING_UNIT_MISMATCH_SPEED 0x0001 325 #define EFI_COMPUTING_UNIT_MISMATCH_FSB_SPEED 0x0002 326 #define EFI_COMPUTING_UNIT_MISMATCH_FAMILY 0x0004 327 #define EFI_COMPUTING_UNIT_MISMATCH_MODEL 0x0008 328 #define EFI_COMPUTING_UNIT_MISMATCH_STEPPING 0x0010 329 #define EFI_COMPUTING_UNIT_MISMATCH_CACHE_SIZE 0x0020 330 #define EFI_COMPUTING_UNIT_MISMATCH_OEM1 0x1000 331 #define EFI_COMPUTING_UNIT_MISMATCH_OEM2 0x2000 332 #define EFI_COMPUTING_UNIT_MISMATCH_OEM3 0x4000 333 #define EFI_COMPUTING_UNIT_MISMATCH_OEM4 0x8000 334 ///@} 335 336 /// 337 /// This structure defines extended data for processor mismatch errors. 338 /// 339 /// This provides information to indicate which processors mismatch, and how they mismatch. The 340 /// status code contains the instance number of the processor that is in error. This structure's 341 /// Instance indicates the second processor that does not match. This differentiation allows the 342 /// consumer to determine which two processors do not match. The Attributes indicate what 343 /// mismatch is being reported. Because Attributes is a bit field, more than one mismatch can be 344 /// reported with one error code. 345 /// 346 typedef struct { 347 /// 348 /// The data header identifying the data. DataHeader.HeaderSize should be 349 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 350 /// sizeof (EFI_ HOST_PROCESSOR_MISMATCH_ERROR_DATA) - 351 /// HeaderSize , and DataHeader.Type should be 352 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 353 /// 354 EFI_STATUS_CODE_DATA DataHeader; 355 /// 356 /// The unit number of the computing unit that does not match. 357 /// 358 UINT32 Instance; 359 /// 360 /// The attributes describing the failure. 361 /// 362 UINT16 Attributes; 363 } EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA; 364 365 /// 366 /// This structure provides details about the computing unit thermal failure. 367 /// 368 /// This structure provides the temperature at the time of error. It also provides the threshold value 369 /// indicating the minimum temperature that is considered an error. 370 /// 371 typedef struct { 372 /// 373 /// The data header identifying the data. DataHeader.HeaderSize should be 374 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 375 /// sizeof (EFI_COMPUTING_UNIT_THERMAL_ERROR_DATA) - 376 /// HeaderSize , and DataHeader.Type should be 377 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 378 /// 379 EFI_STATUS_CODE_DATA DataHeader; 380 /// 381 /// The thermal value at the time of the error. 382 /// 383 EFI_EXP_BASE10_DATA Temperature; 384 /// 385 /// The thermal threshold. 386 /// 387 EFI_EXP_BASE10_DATA Threshold; 388 } EFI_COMPUTING_UNIT_THERMAL_ERROR_DATA; 389 390 /// 391 /// Enumeration of valid cache types 392 /// 393 typedef enum { 394 EfiInitCacheDataOnly, 395 EfiInitCacheInstrOnly, 396 EfiInitCacheBoth, 397 EfiInitCacheUnspecified 398 } EFI_INIT_CACHE_TYPE; 399 400 /// 401 /// Embedded cache init extended data 402 /// 403 typedef struct { 404 /// 405 /// The data header identifying the data. DataHeader.HeaderSize should be 406 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 407 /// sizeof (EFI_CACHE_INIT_DATA) - HeaderSize , and 408 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 409 /// 410 EFI_STATUS_CODE_DATA DataHeader; 411 /// 412 /// The cache level. Starts with 1 for level 1 cache. 413 /// 414 UINT32 Level; 415 /// 416 /// The type of cache. 417 /// 418 EFI_INIT_CACHE_TYPE Type; 419 } EFI_CACHE_INIT_DATA; 420 421 /// 422 /// 423 /// 424 typedef UINT32 EFI_CPU_STATE_CHANGE_CAUSE; 425 426 /// 427 /// The reasons that the processor is disabled. 428 /// Used to fill in EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA.Cause. 429 /// 430 ///@{ 431 #define EFI_CPU_CAUSE_INTERNAL_ERROR 0x0001 432 #define EFI_CPU_CAUSE_THERMAL_ERROR 0x0002 433 #define EFI_CPU_CAUSE_SELFTEST_FAILURE 0x0004 434 #define EFI_CPU_CAUSE_PREBOOT_TIMEOUT 0x0008 435 #define EFI_CPU_CAUSE_FAILED_TO_START 0x0010 436 #define EFI_CPU_CAUSE_CONFIG_ERROR 0x0020 437 #define EFI_CPU_CAUSE_USER_SELECTION 0x0080 438 #define EFI_CPU_CAUSE_BY_ASSOCIATION 0x0100 439 #define EFI_CPU_CAUSE_UNSPECIFIED 0x8000 440 ///@} 441 442 /// 443 /// This structure provides information about the disabled computing unit. 444 /// 445 /// This structure provides details as to why and how the computing unit was disabled. The causes 446 /// should cover the typical reasons a processor would be disabled. How the processor was disabled is 447 /// important because there are distinct differences between hardware and software disabling. 448 /// 449 typedef struct { 450 /// 451 /// The data header identifying the data. DataHeader.HeaderSize should be 452 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 453 /// sizeof (EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA) - 454 /// HeaderSize, and DataHeader.Type should be 455 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 456 /// 457 EFI_STATUS_CODE_DATA DataHeader; 458 /// 459 /// The reason for disabling the processor. 460 /// 461 UINT32 Cause; 462 /// 463 /// TRUE if the processor is disabled via software means such as not listing it in the ACPI tables. 464 /// Such a processor will respond to Interprocessor Interrupts (IPIs). FALSE if the processor is hardware 465 /// disabled, which means it is invisible to software and will not respond to IPIs. 466 /// 467 BOOLEAN SoftwareDisabled; 468 } EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA; 469 470 /// 471 /// Memory Error Granularity Definition 472 /// 473 typedef UINT8 EFI_MEMORY_ERROR_GRANULARITY; 474 475 /// 476 /// Memory Error Granularities. Used to fill in EFI_MEMORY_EXTENDED_ERROR_DATA.Granularity. 477 /// 478 ///@{ 479 #define EFI_MEMORY_ERROR_OTHER 0x01 480 #define EFI_MEMORY_ERROR_UNKNOWN 0x02 481 #define EFI_MEMORY_ERROR_DEVICE 0x03 482 #define EFI_MEMORY_ERROR_PARTITION 0x04 483 ///@} 484 485 /// 486 /// Memory Error Operation Definition 487 /// 488 typedef UINT8 EFI_MEMORY_ERROR_OPERATION; 489 490 /// 491 /// Memory Error Operations. Used to fill in EFI_MEMORY_EXTENDED_ERROR_DATA.Operation. 492 /// 493 ///@{ 494 #define EFI_MEMORY_OPERATION_OTHER 0x01 495 #define EFI_MEMORY_OPERATION_UNKNOWN 0x02 496 #define EFI_MEMORY_OPERATION_READ 0x03 497 #define EFI_MEMORY_OPERATION_WRITE 0x04 498 #define EFI_MEMORY_OPERATION_PARTIAL_WRITE 0x05 499 ///@} 500 501 /// 502 /// This structure provides specific details about the memory error that was detected. It provides 503 /// enough information so that consumers can identify the exact failure and provides enough 504 /// information to enable corrective action if necessary. 505 /// 506 typedef struct { 507 /// 508 /// The data header identifying the data. DataHeader.HeaderSize should be 509 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 510 /// sizeof (EFI_MEMORY_EXTENDED_ERROR_DATA) - HeaderSize, and 511 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 512 /// 513 EFI_STATUS_CODE_DATA DataHeader; 514 /// 515 /// The error granularity type. 516 /// 517 EFI_MEMORY_ERROR_GRANULARITY Granularity; 518 /// 519 /// The operation that resulted in the error being detected. 520 /// 521 EFI_MEMORY_ERROR_OPERATION Operation; 522 /// 523 /// The error syndrome, vendor-specific ECC syndrome, or CRC data associated with 524 /// the error. If unknown, should be initialized to 0. 525 /// Inconsistent with specification here: 526 /// This field in StatusCodes spec0.9 is defined as UINT32, keep code unchanged. 527 /// 528 UINTN Syndrome; 529 /// 530 /// The physical address of the error. 531 /// 532 EFI_PHYSICAL_ADDRESS Address; 533 /// 534 /// The range, in bytes, within which the error address can be determined. 535 /// 536 UINTN Resolution; 537 } EFI_MEMORY_EXTENDED_ERROR_DATA; 538 539 /// 540 /// A definition to describe that the operation is performed on multiple devices within the array. 541 /// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device. 542 /// 543 #define EFI_MULTIPLE_MEMORY_DEVICE_OPERATION 0xfffe 544 545 /// 546 /// A definition to describe that the operation is performed on all devices within the array. 547 /// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device. 548 /// 549 #define EFI_ALL_MEMORY_DEVICE_OPERATION 0xffff 550 551 /// 552 /// A definition to describe that the operation is performed on multiple arrays. 553 /// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device. 554 /// 555 #define EFI_MULTIPLE_MEMORY_ARRAY_OPERATION 0xfffe 556 557 /// 558 /// A definition to describe that the operation is performed on all the arrays. 559 /// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device. 560 /// 561 #define EFI_ALL_MEMORY_ARRAY_OPERATION 0xffff 562 563 /// 564 /// This extended data provides some context that consumers can use to locate a DIMM within the 565 /// overall memory scheme. 566 /// 567 /// This extended data provides some context that consumers can use to locate a DIMM within the 568 /// overall memory scheme. The Array and Device numbers may indicate a specific DIMM, or they 569 /// may be populated with the group definitions in "Related Definitions" below. 570 /// 571 typedef struct { 572 /// 573 /// The data header identifying the data. DataHeader.HeaderSize should be 574 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 575 /// sizeof (EFI_STATUS_CODE_DIMM_NUMBER) - HeaderSize, and 576 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 577 /// 578 EFI_STATUS_CODE_DATA DataHeader; 579 /// 580 /// The memory array number. 581 /// 582 UINT16 Array; 583 /// 584 /// The device number within that Array. 585 /// 586 UINT16 Device; 587 } EFI_STATUS_CODE_DIMM_NUMBER; 588 589 /// 590 /// This structure defines extended data describing memory modules that do not match. 591 /// 592 /// This extended data may be used to convey the specifics of memory modules that do not match. 593 /// 594 typedef struct { 595 /// 596 /// The data header identifying the data. DataHeader.HeaderSize should be 597 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 598 /// sizeof (EFI_MEMORY_MODULE_MISMATCH_ERROR_DATA) - 599 /// HeaderSize, and DataHeader.Type should be 600 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 601 /// 602 EFI_STATUS_CODE_DATA DataHeader; 603 /// 604 /// The instance number of the memory module that does not match. 605 /// 606 EFI_STATUS_CODE_DIMM_NUMBER Instance; 607 } EFI_MEMORY_MODULE_MISMATCH_ERROR_DATA; 608 609 /// 610 /// This structure defines extended data describing a memory range. 611 /// 612 /// This extended data may be used to convey the specifics of a memory range. Ranges are specified 613 /// with a start address and a length. 614 /// 615 typedef struct { 616 /// 617 /// The data header identifying the data. DataHeader.HeaderSize should be 618 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 619 /// sizeof (EFI_MEMORY_RANGE_EXTENDED_DATA) - HeaderSize, and 620 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 621 /// 622 EFI_STATUS_CODE_DATA DataHeader; 623 /// 624 /// The starting address of the memory range. 625 /// 626 EFI_PHYSICAL_ADDRESS Start; 627 /// 628 /// The length in bytes of the memory range. 629 /// 630 EFI_PHYSICAL_ADDRESS Length; 631 } EFI_MEMORY_RANGE_EXTENDED_DATA; 632 633 /// 634 /// This structure provides the assert information that is typically associated with a debug assertion failing. 635 /// 636 /// The data indicates the location of the assertion that failed in the source code. This information 637 /// includes the file name and line number that are necessary to find the failing assertion in source code. 638 /// 639 typedef struct { 640 /// 641 /// The data header identifying the data. DataHeader.HeaderSize should be 642 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 643 /// sizeof (EFI_DEBUG_ASSERT_DATA) - HeaderSize , and 644 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 645 /// 646 EFI_STATUS_CODE_DATA DataHeader; 647 /// 648 /// The line number of the source file where the fault was generated. 649 /// 650 UINT32 LineNumber; 651 /// 652 /// The size in bytes of FileName. 653 /// 654 UINT32 FileNameSize; 655 /// 656 /// A pointer to a NULL-terminated ASCII or Unicode string that represents 657 /// the file name of the source file where the fault was generated. 658 /// 659 EFI_STATUS_CODE_STRING_DATA *FileName; 660 } EFI_DEBUG_ASSERT_DATA; 661 662 /// 663 /// System Context Data EBC/IA32/IPF 664 /// 665 typedef union { 666 /// 667 /// The context of the EBC virtual machine when the exception was generated. Type 668 /// EFI_SYSTEM_CONTEXT_EBC is defined in EFI_DEBUG_SUPPORT_PROTOCOL 669 /// in the UEFI Specification. 670 /// 671 EFI_SYSTEM_CONTEXT_EBC SystemContextEbc; 672 /// 673 /// The context of the IA-32 processor when the exception was generated. Type 674 /// EFI_SYSTEM_CONTEXT_IA32 is defined in the 675 /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification. 676 /// 677 EFI_SYSTEM_CONTEXT_IA32 SystemContextIa32; 678 /// 679 /// The context of the Itanium(R) processor when the exception was generated. Type 680 /// EFI_SYSTEM_CONTEXT_IPF is defined in the 681 /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification. 682 /// 683 EFI_SYSTEM_CONTEXT_IPF SystemContextIpf; 684 /// 685 /// The context of the X64 processor when the exception was generated. Type 686 /// EFI_SYSTEM_CONTEXT_X64 is defined in the 687 /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification. 688 /// 689 EFI_SYSTEM_CONTEXT_X64 SystemContextX64; 690 /// 691 /// The context of the ARM processor when the exception was generated. Type 692 /// EFI_SYSTEM_CONTEXT_ARM is defined in the 693 /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification. 694 /// 695 EFI_SYSTEM_CONTEXT_ARM SystemContextArm; 696 } EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT; 697 698 /// 699 /// This structure defines extended data describing a processor exception error. 700 /// 701 /// This extended data allows the processor context that is present at the time of the exception to be 702 /// reported with the exception. The format and contents of the context data varies depending on the 703 /// processor architecture. 704 /// 705 typedef struct { 706 /// 707 /// The data header identifying the data. DataHeader.HeaderSize should be 708 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 709 /// sizeof (EFI_STATUS_CODE_EXCEP_EXTENDED_DATA) - HeaderSize, 710 /// and DataHeader.Type should be 711 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 712 /// 713 EFI_STATUS_CODE_DATA DataHeader; 714 /// 715 /// The system context. 716 /// 717 EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT Context; 718 } EFI_STATUS_CODE_EXCEP_EXTENDED_DATA; 719 720 /// 721 /// This structure defines extended data describing a call to a driver binding protocol start function. 722 /// 723 /// This extended data records information about a Start() function call. Start() is a member of 724 /// the UEFI Driver Binding Protocol. 725 /// 726 typedef struct { 727 /// 728 /// The data header identifying the data. DataHeader.HeaderSize should be 729 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 730 /// sizeof (EFI_STATUS_CODE_START_EXTENDED_DATA) - HeaderSize, 731 /// and DataHeader.Type should be 732 /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 733 /// 734 EFI_STATUS_CODE_DATA DataHeader; 735 /// 736 /// The controller handle. 737 /// 738 EFI_HANDLE ControllerHandle; 739 /// 740 /// The driver binding handle. 741 /// 742 EFI_HANDLE DriverBindingHandle; 743 /// 744 /// The size of the RemainingDevicePath. It is zero if the Start() function is 745 /// called with RemainingDevicePath = NULL. The UEFI Specification allows 746 /// that the Start() function of bus drivers can be called in this way. 747 /// 748 UINT16 DevicePathSize; 749 /// 750 /// Matches the RemainingDevicePath parameter being passed to the Start() function. 751 /// Note that this parameter is the variable-length device path and not a pointer 752 /// to the device path. 753 /// 754 // EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath; 755 } EFI_STATUS_CODE_START_EXTENDED_DATA; 756 757 /// 758 /// This structure defines extended data describing a legacy option ROM (OpROM). 759 /// 760 /// The device handle and ROM image base can be used by consumers to determine which option ROM 761 /// failed. Due to the black-box nature of legacy option ROMs, the amount of information that can be 762 /// obtained may be limited. 763 /// 764 typedef struct { 765 /// 766 /// The data header identifying the data. DataHeader.HeaderSize should be 767 /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be 768 /// sizeof (EFI_LEGACY_OPROM_EXTENDED_DATA) - HeaderSize, and 769 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 770 /// 771 EFI_STATUS_CODE_DATA DataHeader; 772 /// 773 /// The handle corresponding to the device that this legacy option ROM is being invoked. 774 /// 775 EFI_HANDLE DeviceHandle; 776 /// 777 /// The base address of the shadowed legacy ROM image. May or may not point to the shadow RAM area. 778 /// 779 EFI_PHYSICAL_ADDRESS RomImageBase; 780 } EFI_LEGACY_OPROM_EXTENDED_DATA; 781 782 /// 783 /// This structure defines extended data describing an EFI_STATUS return value that stands for a 784 /// failed function call (such as a UEFI boot service). 785 /// 786 typedef struct { 787 /// 788 /// The data header identifying the data: 789 /// DataHeader.HeaderSize should be sizeof(EFI_STATUS_CODE_DATA), 790 /// DataHeader.Size should be sizeof(EFI_RETURN_STATUS_EXTENDED_DATA) - HeaderSize, 791 /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. 792 /// 793 EFI_STATUS_CODE_DATA DataHeader; 794 /// 795 /// The EFI_STATUS return value of the service or function whose failure triggered the 796 /// reporting of the status code (generally an error code or a debug code). 797 /// 798 EFI_STATUS ReturnStatus; 799 } EFI_RETURN_STATUS_EXTENDED_DATA; 800 801 extern EFI_GUID gEfiStatusCodeSpecificDataGuid; 802 803 #endif 804