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