Skip to content

Commit 4d3cf37

Browse files
philnoh2mergify[bot]
authored andcommitted
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>
1 parent 0f3867f commit 4d3cf37

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
PcdLib
3333
DebugLib
3434
IoLib
35+
UefiBootServicesTableLib
3536

3637
[Pcd]
3738
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress ## CONSUMES

0 commit comments

Comments
 (0)