2 API implementation for instance of Report Status Code Library.
4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
5 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
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.
15 #include <Library/ReportStatusCodeLib.h>
16 #include <Library/BaseLib.h>
17 #include <Library/DebugLib.h>
18 #include <Library/UefiBootServicesTableLib.h>
19 #include <Library/BaseMemoryLib.h>
20 #include <Library/PcdLib.h>
21 #include <Library/DevicePathLib.h>
22 #include <Library/UefiRuntimeLib.h>
24 #include <Protocol/StatusCode.h>
26 #include <Guid/StatusCodeDataTypeId.h>
27 #include <Guid/StatusCodeDataTypeDebug.h>
28 #include <Guid/EventGroup.h>
30 EFI_STATUS_CODE_PROTOCOL
*mReportStatusCodeLibStatusCodeProtocol
= NULL
;
31 EFI_EVENT mReportStatusCodeLibVirtualAddressChangeEvent
;
34 Locate the report status code service.
36 Retrieve ReportStatusCode() API of Report Status Code Protocol.
40 InternalGetReportStatusCode (
46 if (mReportStatusCodeLibStatusCodeProtocol
!= NULL
) {
50 if (EfiAtRuntime ()) {
55 // Check gBS just in case ReportStatusCode is called before gBS is initialized.
57 if (gBS
!= NULL
&& gBS
->LocateProtocol
!= NULL
) {
58 Status
= gBS
->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid
, NULL
, (VOID
**) &mReportStatusCodeLibStatusCodeProtocol
);
59 if (EFI_ERROR (Status
)) {
60 mReportStatusCodeLibStatusCodeProtocol
= NULL
;
66 Notification function of EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE.
68 @param Event Event whose notification function is being invoked.
69 @param Context Pointer to the notification function's context
74 ReportStatusCodeLibVirtualAddressChange (
79 if (mReportStatusCodeLibStatusCodeProtocol
== NULL
) {
82 EfiConvertPointer (0, (VOID
**) &mReportStatusCodeLibStatusCodeProtocol
);
86 The constructor function of Runtime DXE Report Status Code Lib.
88 This function allocates memory for extended status code data, caches
89 the report status code service, and registers events.
91 @param ImageHandle The firmware allocated handle for the EFI image.
92 @param SystemTable A pointer to the EFI System Table.
94 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
99 ReportStatusCodeLibConstructor (
100 IN EFI_HANDLE ImageHandle
,
101 IN EFI_SYSTEM_TABLE
*SystemTable
107 // Cache the report status code service
109 InternalGetReportStatusCode ();
112 // Register notify function for EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
114 Status
= gBS
->CreateEventEx (
117 ReportStatusCodeLibVirtualAddressChange
,
119 &gEfiEventVirtualAddressChangeGuid
,
120 &mReportStatusCodeLibVirtualAddressChangeEvent
122 ASSERT_EFI_ERROR (Status
);
128 The destructor function of Runtime DXE Report Status Code Lib.
130 The destructor function frees memory allocated by constructor, and closes related events.
131 It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS.
133 @param ImageHandle The firmware allocated handle for the EFI image.
134 @param SystemTable A pointer to the EFI System Table.
136 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
141 ReportStatusCodeLibDestructor (
142 IN EFI_HANDLE ImageHandle
,
143 IN EFI_SYSTEM_TABLE
*SystemTable
148 ASSERT (gBS
!= NULL
);
149 Status
= gBS
->CloseEvent (mReportStatusCodeLibVirtualAddressChangeEvent
);
150 ASSERT_EFI_ERROR (Status
);
156 Internal worker function that reports a status code through the Report Status Code Protocol.
158 If status code service is not cached, then this function checks if Report Status Code
159 Protocol is available in system. If Report Status Code Protocol is not available, then
160 EFI_UNSUPPORTED is returned. If Report Status Code Protocol is present, then it is
161 cached in mReportStatusCodeLibStatusCodeProtocol. Finally this function reports status
162 code through the Report Status Code Protocol.
164 @param Type Status code type.
165 @param Value Status code value.
166 @param Instance Status code instance number.
167 @param CallerId Pointer to a GUID that identifies the caller of this
168 function. This is an optional parameter that may be
170 @param Data Pointer to the extended data buffer. This is an
171 optional parameter that may be NULL.
173 @retval EFI_SUCCESS The status code was reported.
174 @retval EFI_UNSUPPORTED Report Status Code Protocol is not available.
175 @retval EFI_UNSUPPORTED Status code type is not supported.
179 InternalReportStatusCode (
180 IN EFI_STATUS_CODE_TYPE Type
,
181 IN EFI_STATUS_CODE_VALUE Value
,
183 IN CONST EFI_GUID
*CallerId OPTIONAL
,
184 IN EFI_STATUS_CODE_DATA
*Data OPTIONAL
187 if ((ReportProgressCodeEnabled() && ((Type
) & EFI_STATUS_CODE_TYPE_MASK
) == EFI_PROGRESS_CODE
) ||
188 (ReportErrorCodeEnabled() && ((Type
) & EFI_STATUS_CODE_TYPE_MASK
) == EFI_ERROR_CODE
) ||
189 (ReportDebugCodeEnabled() && ((Type
) & EFI_STATUS_CODE_TYPE_MASK
) == EFI_DEBUG_CODE
)) {
191 // If mReportStatusCodeLibStatusCodeProtocol is NULL, then check if Report Status Code Protocol is available in system.
193 InternalGetReportStatusCode ();
194 if (mReportStatusCodeLibStatusCodeProtocol
== NULL
) {
195 return EFI_UNSUPPORTED
;
199 // A Report Status Code Protocol is present in system, so pass in all the parameters to the service.
201 return mReportStatusCodeLibStatusCodeProtocol
->ReportStatusCode (Type
, Value
, Instance
, (EFI_GUID
*)CallerId
, Data
);
204 return EFI_UNSUPPORTED
;
209 Converts a status code to an 8-bit POST code value.
211 Converts the status code specified by CodeType and Value to an 8-bit POST code
212 and returns the 8-bit POST code in PostCode. If CodeType is an
213 EFI_PROGRESS_CODE or CodeType is an EFI_ERROR_CODE, then bits 0..4 of PostCode
214 are set to bits 16..20 of Value, and bits 5..7 of PostCode are set to bits
215 24..26 of Value., and TRUE is returned. Otherwise, FALSE is returned.
217 If PostCode is NULL, then ASSERT().
219 @param CodeType The type of status code being converted.
220 @param Value The status code value being converted.
221 @param PostCode A pointer to the 8-bit POST code value to return.
223 @retval TRUE The status code specified by CodeType and Value was converted
224 to an 8-bit POST code and returned in PostCode.
225 @retval FALSE The status code specified by CodeType and Value could not be
226 converted to an 8-bit POST code value.
232 IN EFI_STATUS_CODE_TYPE CodeType
,
233 IN EFI_STATUS_CODE_VALUE Value
,
238 // If PostCode is NULL, then ASSERT()
240 ASSERT (PostCode
!= NULL
);
243 // Convert Value to an 8 bit post code
245 if (((CodeType
& EFI_STATUS_CODE_TYPE_MASK
) == EFI_PROGRESS_CODE
) ||
246 ((CodeType
& EFI_STATUS_CODE_TYPE_MASK
) == EFI_ERROR_CODE
) ) {
247 *PostCode
= (UINT8
) ((((Value
& EFI_STATUS_CODE_CLASS_MASK
) >> 24) << 5) |
248 (((Value
& EFI_STATUS_CODE_SUBCLASS_MASK
) >> 16) & 0x1f));
256 Extracts ASSERT() information from a status code structure.
258 Converts the status code specified by CodeType, Value, and Data to the ASSERT()
259 arguments specified by Filename, Description, and LineNumber. If CodeType is
260 an EFI_ERROR_CODE, and CodeType has a severity of EFI_ERROR_UNRECOVERED, and
261 Value has an operation mask of EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, extract
262 Filename, Description, and LineNumber from the optional data area of the
263 status code buffer specified by Data. The optional data area of Data contains
264 a Null-terminated ASCII string for the FileName, followed by a Null-terminated
265 ASCII string for the Description, followed by a 32-bit LineNumber. If the
266 ASSERT() information could be extracted from Data, then return TRUE.
267 Otherwise, FALSE is returned.
269 If Data is NULL, then ASSERT().
270 If Filename is NULL, then ASSERT().
271 If Description is NULL, then ASSERT().
272 If LineNumber is NULL, then ASSERT().
274 @param CodeType The type of status code being converted.
275 @param Value The status code value being converted.
276 @param Data Pointer to status code data buffer.
277 @param Filename Pointer to the source file name that generated the ASSERT().
278 @param Description Pointer to the description of the ASSERT().
279 @param LineNumber Pointer to source line number that generated the ASSERT().
281 @retval TRUE The status code specified by CodeType, Value, and Data was
282 converted ASSERT() arguments specified by Filename, Description,
284 @retval FALSE The status code specified by CodeType, Value, and Data could
285 not be converted to ASSERT() arguments.
290 ReportStatusCodeExtractAssertInfo (
291 IN EFI_STATUS_CODE_TYPE CodeType
,
292 IN EFI_STATUS_CODE_VALUE Value
,
293 IN CONST EFI_STATUS_CODE_DATA
*Data
,
294 OUT CHAR8
**Filename
,
295 OUT CHAR8
**Description
,
296 OUT UINT32
*LineNumber
299 EFI_DEBUG_ASSERT_DATA
*AssertData
;
301 ASSERT (Data
!= NULL
);
302 ASSERT (Filename
!= NULL
);
303 ASSERT (Description
!= NULL
);
304 ASSERT (LineNumber
!= NULL
);
306 if (((CodeType
& EFI_STATUS_CODE_TYPE_MASK
) == EFI_ERROR_CODE
) &&
307 ((CodeType
& EFI_STATUS_CODE_SEVERITY_MASK
) == EFI_ERROR_UNRECOVERED
) &&
308 ((Value
& EFI_STATUS_CODE_OPERATION_MASK
) == EFI_SW_EC_ILLEGAL_SOFTWARE_STATE
)) {
309 AssertData
= (EFI_DEBUG_ASSERT_DATA
*)(Data
+ 1);
310 *Filename
= (CHAR8
*)(AssertData
+ 1);
311 *Description
= *Filename
+ AsciiStrLen (*Filename
) + 1;
312 *LineNumber
= AssertData
->LineNumber
;
320 Extracts DEBUG() information from a status code structure.
322 Converts the status code specified by Data to the DEBUG() arguments specified
323 by ErrorLevel, Marker, and Format. If type GUID in Data is
324 EFI_STATUS_CODE_DATA_TYPE_DEBUG_GUID, then extract ErrorLevel, Marker, and
325 Format from the optional data area of the status code buffer specified by Data.
326 The optional data area of Data contains a 32-bit ErrorLevel followed by Marker
327 which is 12 UINTN parameters, followed by a Null-terminated ASCII string for
328 the Format. If the DEBUG() information could be extracted from Data, then
329 return TRUE. Otherwise, FALSE is returned.
331 If Data is NULL, then ASSERT().
332 If ErrorLevel is NULL, then ASSERT().
333 If Marker is NULL, then ASSERT().
334 If Format is NULL, then ASSERT().
336 @param Data Pointer to status code data buffer.
337 @param ErrorLevel Pointer to error level mask for a debug message.
338 @param Marker Pointer to the variable argument list associated with Format.
339 @param Format Pointer to a Null-terminated ASCII format string of a
342 @retval TRUE The status code specified by Data was converted DEBUG() arguments
343 specified by ErrorLevel, Marker, and Format.
344 @retval FALSE The status code specified by Data could not be converted to
350 ReportStatusCodeExtractDebugInfo (
351 IN CONST EFI_STATUS_CODE_DATA
*Data
,
352 OUT UINT32
*ErrorLevel
,
353 OUT BASE_LIST
*Marker
,
357 EFI_DEBUG_INFO
*DebugInfo
;
359 ASSERT (Data
!= NULL
);
360 ASSERT (ErrorLevel
!= NULL
);
361 ASSERT (Marker
!= NULL
);
362 ASSERT (Format
!= NULL
);
365 // If the GUID type is not EFI_STATUS_CODE_DATA_TYPE_DEBUG_GUID then return FALSE
367 if (!CompareGuid (&Data
->Type
, &gEfiStatusCodeDataTypeDebugGuid
)) {
372 // Retrieve the debug information from the status code record
374 DebugInfo
= (EFI_DEBUG_INFO
*)(Data
+ 1);
376 *ErrorLevel
= DebugInfo
->ErrorLevel
;
379 // The first 12 * sizeof (UINT64) bytes following EFI_DEBUG_INFO are for variable arguments
380 // of format in DEBUG string. Its address is returned in Marker and has to be 64-bit aligned.
381 // It must be noticed that EFI_DEBUG_INFO follows EFI_STATUS_CODE_DATA, whose size is
382 // 20 bytes. The size of EFI_DEBUG_INFO is 4 bytes, so we can ensure that Marker
383 // returned is 64-bit aligned.
384 // 64-bit aligned is a must, otherwise retrieving 64-bit parameter from BASE_LIST will
385 // cause unalignment exception.
387 *Marker
= (BASE_LIST
) (DebugInfo
+ 1);
388 *Format
= (CHAR8
*)(((UINT64
*)*Marker
) + 12);
395 Reports a status code.
397 Reports the status code specified by the parameters Type and Value. Status
398 code also require an instance, caller ID, and extended data. This function
399 passed in a zero instance, NULL extended data, and a caller ID of
400 gEfiCallerIdGuid, which is the GUID for the module.
402 ReportStatusCode()must actively prevent recusrsion. If ReportStatusCode()
403 is called while processing another any other Report Status Code Library function,
404 then ReportStatusCode() must return immediately.
406 @param Type Status code type.
407 @param Value Status code value.
409 @retval EFI_SUCCESS The status code was reported.
410 @retval EFI_DEVICE_ERROR There status code could not be reported due to a
412 @retval EFI_UNSUPPORTED Report status code is not supported
418 IN EFI_STATUS_CODE_TYPE Type
,
419 IN EFI_STATUS_CODE_VALUE Value
422 return InternalReportStatusCode (Type
, Value
, 0, &gEfiCallerIdGuid
, NULL
);
427 Reports a status code with a Device Path Protocol as the extended data.
429 Allocates and fills in the extended data section of a status code with the
430 Device Path Protocol specified by DevicePath. This function is responsible
431 for allocating a buffer large enough for the standard header and the device
432 path. The standard header is filled in with a GUID of
433 gEfiStatusCodeSpecificDataGuid. The status code is reported with a zero
434 instance and a caller ID of gEfiCallerIdGuid.
436 ReportStatusCodeWithDevicePath()must actively prevent recursion. If
437 ReportStatusCodeWithDevicePath() is called while processing another any other
438 Report Status Code Library function, then ReportStatusCodeWithDevicePath()
439 must return EFI_DEVICE_ERROR immediately.
441 If DevicePath is NULL, then ASSERT().
443 @param Type Status code type.
444 @param Value Status code value.
445 @param DevicePath Pointer to the Device Path Protocol to be reported.
447 @retval EFI_SUCCESS The status code was reported with the extended
448 data specified by DevicePath.
449 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the
450 extended data section.
451 @retval EFI_UNSUPPORTED Report status code is not supported
456 ReportStatusCodeWithDevicePath (
457 IN EFI_STATUS_CODE_TYPE Type
,
458 IN EFI_STATUS_CODE_VALUE Value
,
459 IN CONST EFI_DEVICE_PATH_PROTOCOL
*DevicePath
462 ASSERT (DevicePath
!= NULL
);
463 return ReportStatusCodeWithExtendedData (
467 GetDevicePathSize (DevicePath
)
473 Reports a status code with an extended data buffer.
475 Allocates and fills in the extended data section of a status code with the
476 extended data specified by ExtendedData and ExtendedDataSize. ExtendedData
477 is assumed to be one of the data structures specified in Related Definitions.
478 These data structure do not have the standard header, so this function is
479 responsible for allocating a buffer large enough for the standard header and
480 the extended data passed into this function. The standard header is filled
481 in with a GUID of gEfiStatusCodeSpecificDataGuid. The status code is reported
482 with a zero instance and a caller ID of gEfiCallerIdGuid.
484 ReportStatusCodeWithExtendedData()must actively prevent recursion. If
485 ReportStatusCodeWithExtendedData() is called while processing another any other
486 Report Status Code Library function, then ReportStatusCodeWithExtendedData()
487 must return EFI_DEVICE_ERROR immediately.
489 If ExtendedData is NULL, then ASSERT().
490 If ExtendedDataSize is 0, then ASSERT().
492 @param Type Status code type.
493 @param Value Status code value.
494 @param ExtendedData Pointer to the extended data buffer to be reported.
495 @param ExtendedDataSize The size, in bytes, of the extended data buffer to
498 @retval EFI_SUCCESS The status code was reported with the extended
499 data specified by ExtendedData and ExtendedDataSize.
500 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the
501 extended data section.
502 @retval EFI_UNSUPPORTED Report status code is not supported
507 ReportStatusCodeWithExtendedData (
508 IN EFI_STATUS_CODE_TYPE Type
,
509 IN EFI_STATUS_CODE_VALUE Value
,
510 IN CONST VOID
*ExtendedData
,
511 IN UINTN ExtendedDataSize
514 ASSERT (ExtendedData
!= NULL
);
515 ASSERT (ExtendedDataSize
!= 0);
516 return ReportStatusCodeEx (
529 Reports a status code with full parameters.
531 The function reports a status code. If ExtendedData is NULL and ExtendedDataSize
532 is 0, then an extended data buffer is not reported. If ExtendedData is not
533 NULL and ExtendedDataSize is not 0, then an extended data buffer is allocated.
534 ExtendedData is assumed not have the standard status code header, so this function
535 is responsible for allocating a buffer large enough for the standard header and
536 the extended data passed into this function. The standard header is filled in
537 with a GUID specified by ExtendedDataGuid. If ExtendedDataGuid is NULL, then a
538 GUID of gEfiStatusCodeSpecificDataGuid is used. The status code is reported with
539 an instance specified by Instance and a caller ID specified by CallerId. If
540 CallerId is NULL, then a caller ID of gEfiCallerIdGuid is used.
542 ReportStatusCodeEx()must actively prevent recursion. If
543 ReportStatusCodeEx() is called while processing another any
544 other Report Status Code Library function, then
545 ReportStatusCodeEx() must return EFI_DEVICE_ERROR immediately.
547 If ExtendedData is NULL and ExtendedDataSize is not zero, then ASSERT().
548 If ExtendedData is not NULL and ExtendedDataSize is zero, then ASSERT().
550 @param Type Status code type.
551 @param Value Status code value.
552 @param Instance Status code instance number.
553 @param CallerId Pointer to a GUID that identifies the caller of this
554 function. If this parameter is NULL, then a caller
555 ID of gEfiCallerIdGuid is used.
556 @param ExtendedDataGuid Pointer to the GUID for the extended data buffer.
557 If this parameter is NULL, then a the status code
558 standard header is filled in with
559 gEfiStatusCodeSpecificDataGuid.
560 @param ExtendedData Pointer to the extended data buffer. This is an
561 optional parameter that may be NULL.
562 @param ExtendedDataSize The size, in bytes, of the extended data buffer.
564 @retval EFI_SUCCESS The status code was reported.
565 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate
566 the extended data section if it was specified.
567 @retval EFI_UNSUPPORTED Report status code is not supported
573 IN EFI_STATUS_CODE_TYPE Type
,
574 IN EFI_STATUS_CODE_VALUE Value
,
576 IN CONST EFI_GUID
*CallerId OPTIONAL
,
577 IN CONST EFI_GUID
*ExtendedDataGuid OPTIONAL
,
578 IN CONST VOID
*ExtendedData OPTIONAL
,
579 IN UINTN ExtendedDataSize
583 EFI_STATUS_CODE_DATA
*StatusCodeData
;
584 UINT8 StatusCodeBuffer
[EFI_STATUS_CODE_DATA_MAX_SIZE
];
586 ASSERT (!((ExtendedData
== NULL
) && (ExtendedDataSize
!= 0)));
587 ASSERT (!((ExtendedData
!= NULL
) && (ExtendedDataSize
== 0)));
589 if (EfiAtRuntime ()) {
590 if (sizeof (EFI_STATUS_CODE_DATA
) + ExtendedDataSize
> EFI_STATUS_CODE_DATA_MAX_SIZE
) {
591 return EFI_OUT_OF_RESOURCES
;
593 StatusCodeData
= (EFI_STATUS_CODE_DATA
*)StatusCodeBuffer
;
595 if (gBS
== NULL
|| gBS
->AllocatePool
== NULL
|| gBS
->FreePool
== NULL
) {
596 return EFI_UNSUPPORTED
;
600 // Allocate space for the Status Code Header and its buffer
602 StatusCodeData
= NULL
;
603 gBS
->AllocatePool (EfiBootServicesData
, sizeof (EFI_STATUS_CODE_DATA
) + ExtendedDataSize
, (VOID
**)&StatusCodeData
);
604 if (StatusCodeData
== NULL
) {
605 return EFI_OUT_OF_RESOURCES
;
610 // Fill in the extended data header
612 StatusCodeData
->HeaderSize
= sizeof (EFI_STATUS_CODE_DATA
);
613 StatusCodeData
->Size
= (UINT16
)ExtendedDataSize
;
614 if (ExtendedDataGuid
== NULL
) {
615 ExtendedDataGuid
= &gEfiStatusCodeSpecificDataGuid
;
617 CopyGuid (&StatusCodeData
->Type
, ExtendedDataGuid
);
620 // Fill in the extended data buffer
622 if (ExtendedData
!= NULL
) {
623 CopyMem (StatusCodeData
+ 1, ExtendedData
, ExtendedDataSize
);
627 // Report the status code
629 if (CallerId
== NULL
) {
630 CallerId
= &gEfiCallerIdGuid
;
632 Status
= InternalReportStatusCode (Type
, Value
, Instance
, CallerId
, StatusCodeData
);
635 // Free the allocated buffer
637 if (!EfiAtRuntime()) {
638 gBS
->FreePool (StatusCodeData
);
646 Returns TRUE if status codes of type EFI_PROGRESS_CODE are enabled
648 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED
649 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.
651 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED bit of
652 PcdReportStatusCodeProperyMask is set.
653 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED bit of
654 PcdReportStatusCodeProperyMask is clear.
659 ReportProgressCodeEnabled (
663 return (BOOLEAN
) ((PcdGet8 (PcdReportStatusCodePropertyMask
) & REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED
) != 0);
668 Returns TRUE if status codes of type EFI_ERROR_CODE are enabled
670 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED
671 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.
673 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of
674 PcdReportStatusCodeProperyMask is set.
675 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of
676 PcdReportStatusCodeProperyMask is clear.
681 ReportErrorCodeEnabled (
685 return (BOOLEAN
) ((PcdGet8 (PcdReportStatusCodePropertyMask
) & REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED
) != 0);
690 Returns TRUE if status codes of type EFI_DEBUG_CODE are enabled
692 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED
693 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.
695 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED bit of
696 PcdReportStatusCodeProperyMask is set.
697 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED bit of
698 PcdReportStatusCodeProperyMask is clear.
703 ReportDebugCodeEnabled (
707 return (BOOLEAN
) ((PcdGet8 (PcdReportStatusCodePropertyMask
) & REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED
) != 0);