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