audk/MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf
Phil Noh 4d3cf37ff0 MdePkg/SmmPciExpressLib: Ensure gBS variable for the constructor
The PCD token, PcdPciExpressBaseAddress is referred in the constructor.
If the token is defined as PcdsDynamic type, the PCD function that gets
the token value uses the gBS service to locate PCD protocol internally.
In this case, it is possible for the function to be called before
initializing gBS variable, then cause a system hang due to gBS variable.
Need to ensure the availability of gBS variable.

Signed-off-by: Phil Noh <Phil.Noh@amd.com>
2024-11-22 15:52:38 +00:00

40 lines
1014 B
INI

## @file
# Instance of PCI Express Library using the 256 MB PCI Express MMIO window.
#
# PCI Express Library that uses the 256 MB PCI Express MMIO window to perform
# PCI Configuration cycles. Layers on top of an I/O Library instance.
#
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
# Portions copyright (c) 2016, American Megatrends, Inc. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = SmmPciExpressLib
FILE_GUID = 00D24382-8231-4B18-A4F0-2D94D8FE2E81
MODULE_TYPE = DXE_SMM_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = PciExpressLib|DXE_SMM_DRIVER SMM_CORE
CONSTRUCTOR = SmmPciExpressLibConstructor
[Sources]
PciExpressLib.c
[Packages]
MdePkg/MdePkg.dec
[LibraryClasses]
BaseLib
PcdLib
DebugLib
IoLib
UefiBootServicesTableLib
[Pcd]
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress ## CONSUMES
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize ## CONSUMES