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