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