From 4d3cf37ff05d532c5750f6387193c3f30f2c401b Mon Sep 17 00:00:00 2001 From: Phil Noh Date: Tue, 5 Nov 2024 11:24:01 -0600 Subject: [PATCH] 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 --- MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf | 1 + 1 file changed, 1 insertion(+) diff --git a/MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf b/MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf index 78cab6352fac..f6482ca18e3b 100644 --- a/MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf +++ b/MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf @@ -32,6 +32,7 @@ PcdLib DebugLib IoLib + UefiBootServicesTableLib [Pcd] gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress ## CONSUMES