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>
This commit is contained in:
Phil Noh 2024-11-05 11:24:01 -06:00 committed by mergify[bot]
parent 0f3867fa6e
commit 4d3cf37ff0

View File

@ -32,6 +32,7 @@
PcdLib
DebugLib
IoLib
UefiBootServicesTableLib
[Pcd]
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress ## CONSUMES