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