]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/ReportStatusCodeLib.h
Add BaseReportStatusCodeLibNull instance to MdePkg. This library provides empty funct...
[mirror_edk2.git] / MdePkg / Include / Library / ReportStatusCodeLib.h
CommitLineData
fb3df220 1/** @file\r
50a64e5b 2 Provides services to log status code records.\r
fb3df220 3\r
50a64e5b 4Copyright (c) 2006 - 2008, Intel Corporation\r
5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
fb3df220 9\r
50a64e5b 10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
fb3df220 12\r
13**/\r
14\r
15#ifndef __REPORT_STATUS_CODE_LIB_H__\r
16#define __REPORT_STATUS_CODE_LIB_H__\r
17\r
2a254b90 18#include <Pi/PiMultiPhase.h>\r
c7d265a9 19#include <Protocol/DevicePath.h>\r
20\r
fb3df220 21//\r
22// Declare bits for PcdReportStatusCodePropertyMask\r
23//\r
24#define REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED 0x00000001\r
25#define REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED 0x00000002\r
26#define REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED 0x00000004\r
27\r
28//\r
29// Extended Data structure definitions with EFI_STATUS_CODE_DATA headers removed\r
30//\r
31\r
fb3df220 32/**\r
33 Converts a status code to an 8-bit POST code value.\r
34\r
35 Converts the status code specified by CodeType and Value to an 8-bit POST code \r
36 and returns the 8-bit POST code in PostCode. If CodeType is an \r
37 EFI_PROGRESS_CODE or CodeType is an EFI_ERROR_CODE, then bits 0..4 of PostCode \r
38 are set to bits 16..20 of Value, and bits 5..7 of PostCode are set to bits \r
39 24..26 of Value., and TRUE is returned. Otherwise, FALSE is returned. \r
40\r
41 If PostCode is NULL, then ASSERT().\r
42\r
43 @param CodeType The type of status code being converted.\r
44 @param Value The status code value being converted.\r
45 @param PostCode A pointer to the 8-bit POST code value to return. \r
46\r
47 @retval TRUE The status code specified by CodeType and Value was converted \r
48 to an 8-bit POST code and returned in PostCode.\r
49 @retval FALSE The status code specified by CodeType and Value could not be \r
50 converted to an 8-bit POST code value.\r
51\r
52**/\r
53BOOLEAN\r
54EFIAPI\r
55CodeTypeToPostCode (\r
56 IN EFI_STATUS_CODE_TYPE CodeType,\r
57 IN EFI_STATUS_CODE_VALUE Value,\r
58 OUT UINT8 *PostCode\r
59 );\r
60\r
61\r
62/**\r
63 Extracts ASSERT() information from a status code structure.\r
64\r
65 Converts the status code specified by CodeType, Value, and Data to the ASSERT()\r
66 arguments specified by Filename, Description, and LineNumber. If CodeType is \r
67 an EFI_ERROR_CODE, and CodeType has a severity of EFI_ERROR_UNRECOVERED, and \r
68 Value has an operation mask of EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, extract \r
69 Filename, Description, and LineNumber from the optional data area of the \r
70 status code buffer specified by Data. The optional data area of Data contains \r
71 a Null-terminated ASCII string for the FileName, followed by a Null-terminated \r
72 ASCII string for the Description, followed by a 32-bit LineNumber. If the \r
73 ASSERT() information could be extracted from Data, then return TRUE. \r
74 Otherwise, FALSE is returned. \r
75\r
76 If Data is NULL, then ASSERT().\r
77 If Filename is NULL, then ASSERT().\r
78 If Description is NULL, then ASSERT().\r
79 If LineNumber is NULL, then ASSERT().\r
80\r
81 @param CodeType The type of status code being converted.\r
82 @param Value The status code value being converted.\r
83 @param Data Pointer to status code data buffer. \r
84 @param Filename Pointer to the source file name that generated the ASSERT().\r
85 @param Description Pointer to the description of the ASSERT().\r
86 @param LineNumber Pointer to source line number that generated the ASSERT().\r
87\r
88 @retval TRUE The status code specified by CodeType, Value, and Data was \r
89 converted ASSERT() arguments specified by Filename, Description, \r
90 and LineNumber.\r
91 @retval FALSE The status code specified by CodeType, Value, and Data could \r
92 not be converted to ASSERT() arguments.\r
93\r
94**/\r
95BOOLEAN\r
96EFIAPI\r
97ReportStatusCodeExtractAssertInfo (\r
98 IN EFI_STATUS_CODE_TYPE CodeType,\r
99 IN EFI_STATUS_CODE_VALUE Value, \r
100 IN CONST EFI_STATUS_CODE_DATA *Data, \r
101 OUT CHAR8 **Filename,\r
102 OUT CHAR8 **Description,\r
103 OUT UINT32 *LineNumber\r
104 );\r
105\r
106\r
107/**\r
108 Extracts DEBUG() information from a status code structure.\r
109\r
110 Converts the status code specified by Data to the DEBUG() arguments specified \r
111 by ErrorLevel, Marker, and Format. If type GUID in Data is \r
112 EFI_STATUS_CODE_DATA_TYPE_DEBUG_GUID, then extract ErrorLevel, Marker, and \r
113 Format from the optional data area of the status code buffer specified by Data. \r
114 The optional data area of Data contains a 32-bit ErrorLevel followed by Marker \r
115 which is 12 UINTN parameters, followed by a Null-terminated ASCII string for \r
116 the Format. If the DEBUG() information could be extracted from Data, then \r
117 return TRUE. Otherwise, FALSE is returned.\r
118\r
119 If Data is NULL, then ASSERT().\r
120 If ErrorLevel is NULL, then ASSERT().\r
121 If Marker is NULL, then ASSERT().\r
122 If Format is NULL, then ASSERT().\r
123\r
124 @param Data Pointer to status code data buffer. \r
125 @param ErrorLevel Pointer to error level mask for a debug message.\r
126 @param Marker Pointer to the variable argument list associated with Format.\r
127 @param Format Pointer to a Null-terminated ASCII format string of a \r
128 debug message.\r
129\r
130 @retval TRUE The status code specified by Data was converted DEBUG() arguments \r
131 specified by ErrorLevel, Marker, and Format.\r
132 @retval FALSE The status code specified by Data could not be converted to \r
133 DEBUG() arguments.\r
134\r
135**/\r
136BOOLEAN\r
137EFIAPI\r
138ReportStatusCodeExtractDebugInfo (\r
139 IN CONST EFI_STATUS_CODE_DATA *Data, \r
140 OUT UINT32 *ErrorLevel,\r
141 OUT VA_LIST *Marker,\r
142 OUT CHAR8 **Format\r
143 );\r
144\r
145\r
146/**\r
147 Reports a status code.\r
148\r
149 Reports the status code specified by the parameters Type and Value. Status \r
150 code also require an instance, caller ID, and extended data. This function \r
151 passed in a zero instance, NULL extended data, and a caller ID of \r
152 gEfiCallerIdGuid, which is the GUID for the module. \r
153 \r
154 ReportStatusCode()must actively prevent recusrsion. If ReportStatusCode() \r
155 is called while processing another any other Report Status Code Library function,\r
156 then ReportStatusCode() must return immediately.\r
157\r
158 @param Type Status code type. \r
159 @param Value Status code value.\r
160\r
161 @retval EFI_SUCCESS The status code was reported.\r
162 @retval EFI_DEVICE_ERROR There status code could not be reported due to a \r
163 device error.\r
164 @retval EFI_UNSUPPORTED Report status code is not supported\r
165\r
166**/\r
167EFI_STATUS\r
168EFIAPI\r
169ReportStatusCode (\r
170 IN EFI_STATUS_CODE_TYPE Type,\r
171 IN EFI_STATUS_CODE_VALUE Value\r
172 );\r
173\r
174\r
175/**\r
176 Reports a status code with a Device Path Protocol as the extended data.\r
177\r
178 Allocates and fills in the extended data section of a status code with the \r
179 Device Path Protocol specified by DevicePath. This function is responsible \r
180 for allocating a buffer large enough for the standard header and the device \r
1f25dacf
LG
181 path. The standard header is filled in with an implementation dependent GUID.\r
182 The status code is reported with a zero instance and a caller ID of gEfiCallerIdGuid.\r
fb3df220 183\r
184 ReportStatusCodeWithDevicePath()must actively prevent recursion. If \r
185 ReportStatusCodeWithDevicePath() is called while processing another any other \r
186 Report Status Code Library function, then ReportStatusCodeWithDevicePath() \r
187 must return EFI_DEVICE_ERROR immediately.\r
188\r
189 If DevicePath is NULL, then ASSERT().\r
190\r
191 @param Type Status code type. \r
192 @param Value Status code value.\r
193 @param DevicePath Pointer to the Device Path Protocol to be reported.\r
194\r
195 @retval EFI_SUCCESS The status code was reported with the extended \r
196 data specified by DevicePath.\r
197 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the \r
198 extended data section.\r
199 @retval EFI_UNSUPPORTED Report status code is not supported\r
6d6a1098 200 @retval EFI_DEVICE_ERROR A call to a Report Status Code Library function\r
201 is already in progress.\r
fb3df220 202\r
203**/\r
204EFI_STATUS\r
205EFIAPI\r
206ReportStatusCodeWithDevicePath (\r
207 IN EFI_STATUS_CODE_TYPE Type,\r
208 IN EFI_STATUS_CODE_VALUE Value,\r
209 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
210 );\r
211\r
212\r
213/**\r
214 Reports a status code with an extended data buffer.\r
215\r
216 Allocates and fills in the extended data section of a status code with the \r
217 extended data specified by ExtendedData and ExtendedDataSize. ExtendedData \r
218 is assumed to be one of the data structures specified in Related Definitions. \r
219 These data structure do not have the standard header, so this function is \r
220 responsible for allocating a buffer large enough for the standard header and \r
221 the extended data passed into this function. The standard header is filled \r
1f25dacf 222 in with an implementation dependent GUID. The status code is reported \r
fb3df220 223 with a zero instance and a caller ID of gEfiCallerIdGuid.\r
224\r
225 ReportStatusCodeWithExtendedData()must actively prevent recursion. If \r
226 ReportStatusCodeWithExtendedData() is called while processing another any other \r
227 Report Status Code Library function, then ReportStatusCodeWithExtendedData() \r
228 must return EFI_DEVICE_ERROR immediately.\r
229\r
230 If ExtendedData is NULL, then ASSERT().\r
231 If ExtendedDataSize is 0, then ASSERT().\r
232\r
233 @param Type Status code type. \r
234 @param Value Status code value.\r
235 @param ExtendedData Pointer to the extended data buffer to be reported.\r
236 @param ExtendedDataSize The size, in bytes, of the extended data buffer to \r
237 be reported.\r
238\r
239 @retval EFI_SUCCESS The status code was reported with the extended \r
240 data specified by ExtendedData and ExtendedDataSize.\r
241 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the \r
242 extended data section.\r
243 @retval EFI_UNSUPPORTED Report status code is not supported\r
6d6a1098 244 @retval EFI_DEVICE_ERROR A call to a Report Status Code Library function\r
245 is already in progress.\r
fb3df220 246\r
247**/\r
248EFI_STATUS\r
249EFIAPI\r
250ReportStatusCodeWithExtendedData (\r
251 IN EFI_STATUS_CODE_TYPE Type,\r
252 IN EFI_STATUS_CODE_VALUE Value,\r
253 IN CONST VOID *ExtendedData,\r
254 IN UINTN ExtendedDataSize\r
255 );\r
256\r
257\r
258/**\r
259 Reports a status code with full parameters.\r
260\r
261 The function reports a status code. If ExtendedData is NULL and ExtendedDataSize \r
262 is 0, then an extended data buffer is not reported. If ExtendedData is not \r
263 NULL and ExtendedDataSize is not 0, then an extended data buffer is allocated. \r
264 ExtendedData is assumed not have the standard status code header, so this function \r
265 is responsible for allocating a buffer large enough for the standard header and \r
266 the extended data passed into this function. The standard header is filled in \r
267 with a GUID specified by ExtendedDataGuid. If ExtendedDataGuid is NULL, then a \r
268 GUID of gEfiStatusCodeSpecificDatauid is used. The status code is reported with \r
269 an instance specified by Instance and a caller ID specified by CallerId. If \r
270 CallerId is NULL, then a caller ID of gEfiCallerIdGuid is used.\r
271\r
272 ReportStatusCodeEx()must actively prevent recursion. If ReportStatusCodeEx() \r
273 is called while processing another any other Report Status Code Library function, \r
274 then ReportStatusCodeEx() must return EFI_DEVICE_ERROR immediately.\r
275\r
276 If ExtendedData is NULL and ExtendedDataSize is not zero, then ASSERT().\r
277 If ExtendedData is not NULL and ExtendedDataSize is zero, then ASSERT().\r
278\r
279 @param Type Status code type. \r
280 @param Value Status code value.\r
281 @param Instance Status code instance number.\r
282 @param CallerId Pointer to a GUID that identifies the caller of this \r
283 function. If this parameter is NULL, then a caller \r
284 ID of gEfiCallerIdGuid is used.\r
285 @param ExtendedDataGuid Pointer to the GUID for the extended data buffer. \r
286 If this parameter is NULL, then a the status code \r
1f25dacf 287 standard header is filled in with an implementation dependent GUID.\r
fb3df220 288 @param ExtendedData Pointer to the extended data buffer. This is an \r
289 optional parameter that may be NULL.\r
290 @param ExtendedDataSize The size, in bytes, of the extended data buffer.\r
291\r
292 @retval EFI_SUCCESS The status code was reported.\r
293 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate \r
294 the extended data section if it was specified.\r
6d6a1098 295 @retval EFI_UNSUPPORTED Report status code is not supported.\r
296 @retval EFI_DEVICE_ERROR A call to a Report Status Code Library function\r
297 is already in progress.\r
fb3df220 298\r
299**/\r
300EFI_STATUS\r
301EFIAPI\r
302ReportStatusCodeEx (\r
303 IN EFI_STATUS_CODE_TYPE Type,\r
304 IN EFI_STATUS_CODE_VALUE Value,\r
305 IN UINT32 Instance,\r
306 IN CONST EFI_GUID *CallerId OPTIONAL,\r
307 IN CONST EFI_GUID *ExtendedDataGuid OPTIONAL,\r
308 IN CONST VOID *ExtendedData OPTIONAL,\r
309 IN UINTN ExtendedDataSize\r
310 );\r
311\r
312\r
313/**\r
314 Returns TRUE if status codes of type EFI_PROGRESS_CODE are enabled\r
315\r
316 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED \r
317 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.\r
318\r
319 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED bit of \r
320 PcdReportStatusCodeProperyMask is set.\r
321 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED bit of \r
322 PcdReportStatusCodeProperyMask is clear.\r
323\r
324**/\r
325BOOLEAN\r
326EFIAPI\r
327ReportProgressCodeEnabled (\r
328 VOID\r
329 );\r
330\r
331\r
332/**\r
333 Returns TRUE if status codes of type EFI_ERROR_CODE are enabled\r
334\r
335 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED \r
336 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.\r
337\r
338 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of \r
339 PcdReportStatusCodeProperyMask is set.\r
340 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of \r
341 PcdReportStatusCodeProperyMask is clear.\r
342\r
343**/\r
344BOOLEAN\r
345EFIAPI\r
346ReportErrorCodeEnabled (\r
347 VOID\r
348 );\r
349\r
350\r
351/**\r
352 Returns TRUE if status codes of type EFI_DEBUG_CODE are enabled\r
353\r
354 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED \r
355 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.\r
356\r
357 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED bit of \r
358 PcdReportStatusCodeProperyMask is set.\r
359 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED bit of \r
360 PcdReportStatusCodeProperyMask is clear.\r
361\r
362**/\r
363BOOLEAN\r
364EFIAPI\r
365ReportDebugCodeEnabled (\r
366 VOID\r
367 );\r
368\r
369\r
370/**\r
371 Reports a status code with minimal parameters if the status code type is enabled.\r
372\r
373 If the status code type specified by Type is enabled in \r
374 PcdReportStatusCodeProperyMask, then call ReportStatusCode() passing in Type \r
375 and Value.\r
376\r
377 @param Type Status code type. \r
378 @param Value Status code value.\r
379\r
380 @retval EFI_SUCCESS The status code was reported.\r
381 @retval EFI_DEVICE_ERROR There status code could not be reported due to a device error.\r
382 @retval EFI_UNSUPPORTED Report status code is not supported\r
383\r
384**/\r
385#define REPORT_STATUS_CODE(Type,Value) \\r
386 (ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ? \\r
387 ReportStatusCode(Type,Value) : \\r
388 (ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ? \\r
389 ReportStatusCode(Type,Value) : \\r
390 (ReportDebugCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE) ? \\r
391 ReportStatusCode(Type,Value) : \\r
392 EFI_UNSUPPORTED\r
393\r
394\r
395/**\r
396 Reports a status code with a Device Path Protocol as the extended data if the \r
397 status code type is enabled.\r
398\r
399 If the status code type specified by Type is enabled in \r
400 PcdReportStatusCodeProperyMask, then call ReportStatusCodeWithDevicePath() \r
401 passing in Type, Value, and DevicePath.\r
402\r
403 @param Type Status code type. \r
404 @param Value Status code value.\r
405 @param DevicePath Pointer to the Device Path Protocol to be reported.\r
406\r
407 @retval EFI_SUCCESS The status code was reported with the extended \r
408 data specified by DevicePath.\r
409 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the \r
410 extended data section.\r
411 @retval EFI_UNSUPPORTED Report status code is not supported\r
6d6a1098 412 @retval EFI_DEVICE_ERROR A call to a Report Status Code Library function\r
413 is already in progress.\r
fb3df220 414\r
415**/\r
416#define REPORT_STATUS_CODE_WITH_DEVICE_PATH(Type,Value,DevicePathParameter) \\r
417 (ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ? \\r
418 ReportStatusCodeWithDevicePath(Type,Value,DevicePathParameter) : \\r
419 (ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ? \\r
420 ReportStatusCodeWithDevicePath(Type,Value,DevicePathParameter) : \\r
421 (ReportDebugCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE) ? \\r
422 ReportStatusCodeWithDevicePath(Type,Value,DevicePathParameter) : \\r
423 EFI_UNSUPPORTED\r
424\r
425\r
426/**\r
427 Reports a status code with an extended data buffer if the status code type \r
428 is enabled.\r
429\r
430 If the status code type specified by Type is enabled in \r
431 PcdReportStatusCodeProperyMask, then call ReportStatusCodeWithExtendedData() \r
432 passing in Type, Value, ExtendedData, and ExtendedDataSize.\r
433\r
434 @param Type Status code type. \r
435 @param Value Status code value.\r
436 @param ExtendedData Pointer to the extended data buffer to be reported.\r
437 @param ExtendedDataSize The size, in bytes, of the extended data buffer to\r
438 be reported.\r
439\r
440 @retval EFI_SUCCESS The status code was reported with the extended \r
441 data specified by ExtendedData and ExtendedDataSize.\r
442 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the \r
443 extended data section.\r
444 @retval EFI_UNSUPPORTED Report status code is not supported\r
6d6a1098 445 @retval EFI_DEVICE_ERROR A call to a Report Status Code Library function\r
446 is already in progress.\r
fb3df220 447\r
448**/\r
449#define REPORT_STATUS_CODE_WITH_EXTENDED_DATA(Type,Value,ExtendedData,ExtendedDataSize) \\r
450 (ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ? \\r
451 ReportStatusCodeWithExtendedData(Type,Value,ExtendedData,ExtendedDataSize) : \\r
452 (ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ? \\r
453 ReportStatusCodeWithExtendedData(Type,Value,ExtendedData,ExtendedDataSize) : \\r
454 (ReportDebugCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE) ? \\r
455 ReportStatusCodeWithExtendedData(Type,Value,ExtendedData,ExtendedDataSize) : \\r
456 EFI_UNSUPPORTED\r
457\r
458/**\r
459 Reports a status code specifying all parameters if the status code type is enabled.\r
460\r
461 If the status code type specified by Type is enabled in \r
462 PcdReportStatusCodeProperyMask, then call ReportStatusCodeEx() passing in Type, \r
463 Value, Instance, CallerId, ExtendedDataGuid, ExtendedData, and ExtendedDataSize.\r
464\r
465 @param Type Status code type. \r
466 @param Value Status code value.\r
467 @param Instance Status code instance number.\r
468 @param CallerId Pointer to a GUID that identifies the caller of this \r
469 function. If this parameter is NULL, then a caller \r
470 ID of gEfiCallerIdGuid is used.\r
471 @param ExtendedDataGuid Pointer to the GUID for the extended data buffer. \r
472 If this parameter is NULL, then a the status code \r
1f25dacf 473 standard header is filled in with an implementation dependent GUID.\r
fb3df220 474 @param ExtendedData Pointer to the extended data buffer. This is an \r
475 optional parameter that may be NULL.\r
476 @param ExtendedDataSize The size, in bytes, of the extended data buffer.\r
477\r
478 @retval EFI_SUCCESS The status code was reported.\r
479 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the \r
480 extended data section if it was specified.\r
481 @retval EFI_UNSUPPORTED Report status code is not supported\r
6d6a1098 482 @retval EFI_DEVICE_ERROR A call to a Report Status Code Library function\r
483 is already in progress.\r
fb3df220 484\r
485**/\r
486#define REPORT_STATUS_CODE_EX(Type,Value,Instance,CallerId,ExtendedDataGuid,ExtendedData,ExtendedDataSize) \\r
487 (ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ? \\r
488 ReportStatusCodeEx(Type,Value,Instance,CallerId,ExtendedDataGuid,ExtendedData,ExtendedDataSize) : \\r
489 (ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ? \\r
490 ReportStatusCodeEx(Type,Value,Instance,CallerId,ExtendedDataGuid,ExtendedData,ExtendedDataSize) : \\r
491 (ReportDebugCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE) ? \\r
492 ReportStatusCodeEx(Type,Value,Instance,CallerId,ExtendedDataGuid,ExtendedData,ExtendedDataSize) : \\r
493 EFI_UNSUPPORTED\r
494\r
495#endif\r