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