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