Files
edk2-upstream/MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
Joey Vagedes ce61d5f327 MdeModulePkg: DxeReportStatusCodeLib: Do not query protocol
This commit stops the library from querying the protocol database for
the status code protocol at the time of library function use. This logic
can result in a TPL inversion if the protocol has not yet been cached
and the caller is calling the library function when the TPL is higher
then TPL_NOTIFY.

Instead, the protocol is now located during the constructor of the
library. If the protocol is not found, then an on-protocol install event
is registered which will cache the protocol. A destructor is also added
to close the event in the scenario that the driver is unloaded before
the protocol is installed.

Signed-off-by: Joey Vagedes <joey.vagedes@gmail.com>
2026-01-14 04:00:20 +00:00

55 lines
1.5 KiB
INI

## @file
# DXE report status code library.
#
# Retrieve status code and report status code in DXE phase.
#
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = DxeReportStatusCodeLib
MODULE_UNI_FILE = DxeReportStatusCodeLib.uni
FILE_GUID = EBF144C8-70F5-4e09-ADE2-F41F5C59AFDA
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = ReportStatusCodeLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER SMM_CORE
CONSTRUCTOR = ReportStatusCodeLibConstructor
DESTRUCTOR = ReportStatusCodeLibDestructor
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 EBC
#
[Sources]
ReportStatusCodeLib.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
BaseLib
DebugLib
UefiBootServicesTableLib
BaseMemoryLib
PcdLib
DevicePathLib
[Guids]
gEfiStatusCodeSpecificDataGuid ## SOMETIMES_CONSUMES ## UNDEFINED
gEfiStatusCodeDataTypeDebugGuid ## SOMETIMES_CONSUMES ## UNDEFINED
[Protocols]
gEfiStatusCodeRuntimeProtocolGuid ## CONSUMES
[Pcd]
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask ## CONSUMES