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