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