diff options
author | Phil Noh <Phil.Noh@amd.com> | 2024-11-05 11:24:01 -0600 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-11-22 15:52:38 +0000 |
commit | 4d3cf37ff05d532c5750f6387193c3f30f2c401b (patch) | |
tree | fd0eb7dc59c8616de7c3880f64bde2562c33a1ab /MdePkg | |
parent | 0f3867fa6ef0553e26c42f7d71ff6bdb98429742 (diff) | |
download | edk2-4d3cf37ff05d532c5750f6387193c3f30f2c401b.tar.gz |
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>
Diffstat (limited to 'MdePkg')
-rw-r--r-- | MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf b/MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf index 78cab6352f..f6482ca18e 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
|