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