Home | History | Annotate | Download | only in StatusCodeDataTypeId
      1 /*++
      2 
      3 Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
      4 This program and the accompanying materials
      5 are licensed and made available under the terms and conditions of the BSD License
      6 which accompanies this distribution.  The full text of the license may be found at
      7 http://opensource.org/licenses/bsd-license.php
      8 
      9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     11 
     12 Module Name:
     13 
     14   StatusCodeDataTypeId.h
     15 
     16 Abstract:
     17 
     18   GUID used to identify id for the caller who is initiating the Status Code.
     19 
     20 --*/
     21 
     22 #ifndef _STATUS_CODE_DATA_TYPE_ID_H__
     23 #define _STATUS_CODE_DATA_TYPE_ID_H__
     24 
     25 
     26 #include "EfiStatusCode.h"
     27 #include EFI_PROTOCOL_DEFINITION (DebugSupport)
     28 #if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
     29 #include EFI_PROTOCOL_DEFINITION (HiiDatabase)
     30 #else
     31 #include EFI_PROTOCOL_DEFINITION (Hii)
     32 #endif
     33 //
     34 // The size of string
     35 //
     36 #define EFI_STATUS_CODE_DATA_MAX_STRING_SIZE  150
     37 
     38 //
     39 // This is the max data size including all the headers which can be passed
     40 // as Status Code data. This data should be multiple of 8 byte
     41 // to avoid any kind of boundary issue. Also, sum of this data size (inclusive
     42 // of size of EFI_STATUS_CODE_DATA should not exceed the max record size of
     43 // data hub
     44 //
     45 #define EFI_STATUS_CODE_DATA_MAX_SIZE 200
     46 
     47 //
     48 // String Data Type defintion. This is part of Status Code Specification
     49 //
     50 #define EFI_STATUS_CODE_DATA_TYPE_STRING_GUID \
     51   { \
     52     0x92D11080, 0x496F, 0x4D95, {0xBE, 0x7E, 0x03, 0x74, 0x88, 0x38, 0x2B, 0x0A} \
     53   }
     54 
     55 extern EFI_GUID gEfiStatusCodeDataTypeStringGuid;
     56 
     57 //
     58 // This GUID indicates that the format of the accompanying data depends
     59 // upon the Status Code Value, but follows this Specification
     60 //
     61 #define EFI_STATUS_CODE_SPECIFIC_DATA_GUID \
     62   { \
     63     0x335984bd, 0xe805, 0x409a, {0xb8, 0xf8, 0xd2, 0x7e, 0xce, 0x5f, 0xf7, 0xa6} \
     64   }
     65 
     66 extern EFI_GUID gEfiStatusCodeSpecificDataGuid;
     67 
     68 #pragma pack(1)
     69 
     70 typedef enum {
     71   EfiStringAscii,
     72   EfiStringUnicode,
     73   EfiStringToken
     74 } EFI_STRING_TYPE;
     75 
     76 //
     77 // HII string token
     78 //
     79 typedef struct {
     80 EFI_HII_HANDLE Handle;
     81 STRING_REF Token;
     82 } EFI_STATUS_CODE_STRING_TOKEN;
     83 
     84 typedef union {
     85 CHAR8   *Ascii;
     86 CHAR16  *Unicode;
     87 EFI_STATUS_CODE_STRING_TOKEN Hii;
     88 } EFI_STATUS_CODE_STRING;
     89 
     90 typedef struct {
     91   EFI_STATUS_CODE_DATA   DataHeader;
     92   EFI_STRING_TYPE        StringType;
     93   EFI_STATUS_CODE_STRING String;
     94 } EFI_STATUS_CODE_STRING_DATA;
     95 
     96 #pragma pack()
     97 //
     98 // Debug Assert Data. This is part of Status Code Specification
     99 //
    100 #define EFI_STATUS_CODE_DATA_TYPE_ASSERT_GUID \
    101   { \
    102     0xDA571595, 0x4D99, 0x487C, {0x82, 0x7C, 0x26, 0x22, 0x67, 0x7D, 0x33, 0x07} \
    103   }
    104 
    105 extern EFI_GUID gEfiStatusCodeDataTypeAssertGuid;
    106 
    107 //
    108 // Exception Data type (CPU REGS)
    109 //
    110 #define EFI_STATUS_CODE_DATA_TYPE_EXCEPTION_HANDLER_GUID \
    111   { \
    112     0x3BC2BD12, 0xAD2E, 0x11D5, {0x87, 0xDD, 0x00, 0x06, 0x29, 0x45, 0xC3, 0xB9} \
    113   }
    114 
    115 extern EFI_GUID gEfiStatusCodeDataTypeExceptionHandlerGuid;
    116 
    117 //
    118 // Debug DataType defintions. User Defined Data Types.
    119 //
    120 #define EFI_STATUS_CODE_DATA_TYPE_DEBUG_GUID \
    121   { \
    122     0x9A4E9246, 0xD553, 0x11D5, {0x87, 0xE2, 0x00, 0x06, 0x29, 0x45, 0xC3, 0xb9} \
    123   }
    124 
    125 #pragma pack(1)
    126 
    127 typedef struct {
    128   UINT32  ErrorLevel;
    129   //
    130   // 12 * sizeof (UINT64) Var Arg stack
    131   //
    132   // ascii DEBUG () Format string
    133   //
    134 } EFI_DEBUG_INFO;
    135 
    136 #pragma pack()
    137 
    138 extern EFI_GUID gEfiStatusCodeDataTypeDebugGuid;
    139 
    140 //
    141 // Progress Code. User Defined Data Type Guid.
    142 //
    143 #define EFI_STATUS_CODE_DATA_TYPE_ERROR_GUID \
    144   { \
    145     0xAB359CE3, 0x99B3, 0xAE18, {0xC8, 0x9D, 0x95, 0xD3, 0xB0, 0x72, 0xE1, 0x9B} \
    146   }
    147 
    148 extern EFI_GUID gEfiStatusCodeDataTypeErrorGuid;
    149 
    150 //
    151 // declaration for EFI_EXP_DATA. This may change
    152 //
    153 typedef UINTN   EFI_EXP_DATA;
    154 
    155 //
    156 // Voltage Extended Error Data
    157 //
    158 typedef struct {
    159   EFI_STATUS_CODE_DATA  DataHeader;
    160   EFI_EXP_DATA          Voltage;
    161   EFI_EXP_DATA          Threshold;
    162 } EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA;
    163 
    164 //
    165 // Microcode Update Extended Error Data
    166 //
    167 typedef struct {
    168   EFI_STATUS_CODE_DATA  DataHeader;
    169   UINT32                Version;
    170 } EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA;
    171 
    172 //
    173 // Asynchronous Timer Extended Error Data
    174 //
    175 typedef struct {
    176   EFI_STATUS_CODE_DATA  DataHeader;
    177   EFI_EXP_DATA          TimerLimit;
    178 } EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA;
    179 
    180 //
    181 // Host Processor Mismatch Extended Error Data
    182 //
    183 typedef struct {
    184   EFI_STATUS_CODE_DATA  DataHeader;
    185   UINT32                Instance;
    186   UINT16                Attributes;
    187 } EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA;
    188 
    189 //
    190 // EFI_COMPUTING_UNIT_MISMATCH_ATTRIBUTES
    191 // All other attributes are reserved for future use and
    192 // must be initialized to 0.
    193 //
    194 #define EFI_COMPUTING_UNIT_MISMATCH_SPEED       0x0001
    195 #define EFI_COMPUTING_UNIT_MISMATCH_FSB_SPEED   0x0002
    196 #define EFI_COMPUTING_UNIT_MISMATCH_FAMILY      0x0004
    197 #define EFI_COMPUTING_UNIT_MISMATCH_MODEL       0x0008
    198 #define EFI_COMPUTING_UNIT_MISMATCH_STEPPING    0x0010
    199 #define EFI_COMPUTING_UNIT_MISMATCH_CACHE_SIZE  0x0020
    200 #define EFI_COMPUTING_UNIT_MISMATCH_OEM1        0x1000
    201 #define EFI_COMPUTING_UNIT_MISMATCH_OEM2        0x2000
    202 #define EFI_COMPUTING_UNIT_MISMATCH_OEM3        0x4000
    203 #define EFI_COMPUTING_UNIT_MISMATCH_OEM4        0x8000
    204 
    205 //
    206 // Thermal Extended Error Data
    207 //
    208 typedef struct {
    209   EFI_STATUS_CODE_DATA  DataHeader;
    210   EFI_EXP_DATA          Temperature;
    211   EFI_EXP_DATA          Threshold;
    212 } EFI_COMPUTING_UNIT_THERMAL_ERROR_DATA;
    213 
    214 //
    215 // Processor Disabled Extended Error Data
    216 //
    217 typedef struct {
    218   EFI_STATUS_CODE_DATA  DataHeader;
    219   UINT32                Cause;
    220   BOOLEAN               SoftwareDisabled;
    221 } EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA;
    222 
    223 typedef enum {
    224   EfiInitCacheDataOnly,
    225   EfiInitCacheInstrOnly,
    226   EfiInitCacheBoth,
    227   EfiInitCacheUnspecified
    228 } EFI_INIT_CACHE_TYPE;
    229 
    230 //
    231 // Embedded cache init extended data
    232 //
    233 typedef struct {
    234   EFI_STATUS_CODE_DATA  DataHeader;
    235   UINT32                Level;
    236   EFI_INIT_CACHE_TYPE   Type;
    237 } EFI_CACHE_INIT_DATA;
    238 
    239 //
    240 // Memory Extended Error Data
    241 //
    242 //
    243 // Memory Error Granularity Definition
    244 //
    245 typedef UINT8 EFI_MEMORY_ERROR_GRANULARITY;
    246 
    247 //
    248 // Memory Error Operation Definition
    249 //
    250 typedef UINT8 EFI_MEMORY_ERROR_OPERATION;
    251 
    252 typedef struct {
    253   EFI_STATUS_CODE_DATA          DataHeader;
    254   EFI_MEMORY_ERROR_GRANULARITY  Granularity;
    255   EFI_MEMORY_ERROR_OPERATION    Operation;
    256   UINTN                         Syndrome;
    257   EFI_PHYSICAL_ADDRESS          Address;
    258   UINTN                         Resolution;
    259 } EFI_MEMORY_EXTENDED_ERROR_DATA;
    260 
    261 //
    262 // Memory Error Granularities
    263 //
    264 #define EFI_MEMORY_ERROR_OTHER      0x01
    265 #define EFI_MEMORY_ERROR_UNKNOWN    0x02
    266 #define EFI_MEMORY_ERROR_DEVICE     0x03
    267 #define EFI_MEMORY_ERROR_PARTITION  0x04
    268 
    269 //
    270 // Memory Error Operations
    271 //
    272 #define EFI_MEMORY_OPERATION_OTHER          0x01
    273 #define EFI_MEMORY_OPERATION_UNKNOWN        0x02
    274 #define EFI_MEMORY_OPERATION_READ           0x03
    275 #define EFI_MEMORY_OPERATION_WRITE          0x04
    276 #define EFI_MEMORY_OPERATION_PARTIAL_WRITE  0x05
    277 
    278 //
    279 // Define shorthands to describe Group Operations
    280 // Many memory init operations are essentially group
    281 // operations.
    282 // A shorthand to describe that the operation is performed
    283 // on multiple devices within the array
    284 //
    285 #define EFI_MULTIPLE_MEMORY_DEVICE_OPERATION  0xfffe
    286 //
    287 // A shorthand to describe that the operation is performed // on all devices within the array
    288 //
    289 #define EFI_ALL_MEMORY_DEVICE_OPERATION 0xffff
    290 //
    291 // A shorthand to describe that the operation is performed // on multiple arrays
    292 //
    293 #define EFI_MULTIPLE_MEMORY_ARRAY_OPERATION 0xfffe
    294 //
    295 // A shorthand to describe that the operation is performed // on all the arrays
    296 //
    297 #define EFI_ALL_MEMORY_ARRAY_OPERATION  0xffff
    298 
    299 //
    300 // DIMM number
    301 //
    302 #pragma pack(1)
    303 typedef struct {
    304   EFI_STATUS_CODE_DATA  DataHeader;
    305   UINT16                Array;
    306   UINT16                Device;
    307 } EFI_STATUS_CODE_DIMM_NUMBER;
    308 #pragma pack()
    309 //
    310 // Memory Module Mismatch Extended Error Data
    311 //
    312 typedef struct {
    313   EFI_STATUS_CODE_DATA        DataHeader;
    314   EFI_STATUS_CODE_DIMM_NUMBER Instance;
    315 } EFI_MEMORY_MODULE_MISMATCH_ERROR_DATA;
    316 
    317 //
    318 // Memory Range Extended Data
    319 //
    320 typedef struct {
    321   EFI_STATUS_CODE_DATA  DataHeader;
    322   EFI_PHYSICAL_ADDRESS  Start;
    323   EFI_PHYSICAL_ADDRESS  Length;
    324 } EFI_MEMORY_RANGE_EXTENDED_DATA;
    325 
    326 //
    327 // Device handle Extended Data. Used for many
    328 // errors and progress codes to point to the device.
    329 //
    330 typedef struct {
    331   EFI_STATUS_CODE_DATA  DataHeader;
    332   EFI_HANDLE            Handle;
    333 } EFI_DEVICE_HANDLE_EXTENDED_DATA;
    334 
    335 //
    336 // Resource Allocation Failure Extended Error Data
    337 //
    338 typedef struct {
    339   EFI_STATUS_CODE_DATA      DataHeader;
    340   EFI_DEVICE_PATH_PROTOCOL  *DevicePath;
    341   UINT32                    Bar;
    342   VOID                      *ReqRes;
    343   VOID                      *AllocRes;
    344 } EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA;
    345 
    346 //
    347 // Extended Error Data for Assert
    348 //
    349 typedef struct {
    350   EFI_STATUS_CODE_DATA        DataHeader;
    351   UINT32                      LineNumber;
    352   UINT32                      FileNameSize;
    353   EFI_STATUS_CODE_STRING_DATA *FileName;
    354 } EFI_DEBUG_ASSERT_DATA;
    355 
    356 //
    357 // System Context Data EBC/IA32/IPF
    358 //
    359 typedef union {
    360   EFI_SYSTEM_CONTEXT_EBC  SystemContextEbc;
    361   EFI_SYSTEM_CONTEXT_IA32 SystemContextIa32;
    362   EFI_SYSTEM_CONTEXT_IPF  SystemContextIpf;
    363 } EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT;
    364 
    365 typedef struct {
    366   EFI_STATUS_CODE_DATA                  DataHeader;
    367   EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT  Context;
    368 } EFI_STATUS_CODE_EXCEP_EXTENDED_DATA;
    369 
    370 //
    371 // Legacy Oprom extended data
    372 //
    373 typedef struct {
    374   EFI_STATUS_CODE_DATA  DataHeader;
    375   EFI_HANDLE            DeviceHandle;
    376   EFI_PHYSICAL_ADDRESS  RomImageBase;
    377 } EFI_LEGACY_OPROM_EXTENDED_DATA;
    378 
    379 //
    380 // Progress Code. User Defined Data Type Guid.
    381 //
    382 #define EFI_STATUS_CODE_DATA_TYPE_PROGRESS_CODE_GUID \
    383   { \
    384     0xA356AB39, 0x35C4, 0x35DA, {0xB3, 0x7A, 0xF8, 0xEA, 0x9E, 0x8B, 0x36, 0xA3} \
    385   }
    386 
    387 extern EFI_GUID gEfiStatusCodeDataTypeProgressCodeGuid;
    388 
    389 #endif
    390