REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1416 After ExitBootServices, some pointer would be invalid such as the Protocol pointer and gST. The function depend on those should be prevent. So disable the related function while after ExitBootServices. Change the gST to a internal one, because there will be a cycle consume between UefiBootServicesTableLib and DebugLib due to the library constructors. Also remove the SMM support for this instance. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Turner <Michael.Turner@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
54 lines
1.4 KiB
INI
54 lines
1.4 KiB
INI
## @file
|
|
# Instance of Debug Library using the Standard Error Device.
|
|
#
|
|
# Debug Lib that sends messages to the the Standard Error Device in the EFI System Table.
|
|
#
|
|
# Copyright (c) 2018, Microsoft Corporation
|
|
#
|
|
# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = UefiDebugLibStdErr
|
|
MODULE_UNI_FILE = UefiDebugLibStdErr.uni
|
|
FILE_GUID = b57a1df6-ffdb-4247-a3df-3a562176751a
|
|
MODULE_TYPE = UEFI_DRIVER
|
|
VERSION_STRING = 1.0
|
|
LIBRARY_CLASS = DebugLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION UEFI_DRIVER
|
|
|
|
CONSTRUCTOR = DxeDebugLibConstructor
|
|
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
|
#
|
|
|
|
[Sources]
|
|
DebugLib.c
|
|
DebugLibConstructor.c
|
|
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
|
|
|
|
[LibraryClasses]
|
|
BaseMemoryLib
|
|
BaseLib
|
|
PcdLib
|
|
PrintLib
|
|
DebugPrintErrorLevelLib
|
|
|
|
[Guids]
|
|
gEfiEventExitBootServicesGuid ## CONSUMES
|
|
|
|
[Pcd]
|
|
gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## SOMETIMES_CONSUMES
|
|
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES
|
|
gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel ## CONSUMES
|
|
|