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