diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2022-12-02 14:09:59 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-12-14 17:45:41 +0000 |
commit | 9d9d15b42a5e13bb18729da0f608c629aa274e80 (patch) | |
tree | 21679207e1f5f90c181627f83c2c33706bd67a96 /OvmfPkg/PlatformPei | |
parent | 78c373f2a5273af00b23b55d3e8c41583310cfb6 (diff) | |
download | edk2-9d9d15b42a5e13bb18729da0f608c629aa274e80.tar.gz edk2-9d9d15b42a5e13bb18729da0f608c629aa274e80.tar.bz2 edk2-9d9d15b42a5e13bb18729da0f608c629aa274e80.zip |
OvmfPkg/PlatformPei: PeiFv: stop using mPlatformInfoHob
Stop using the mPlatformInfoHob global variable in PeiFvInitialization()
function. Pass a pointer to the PlatformInfoHob instead.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'OvmfPkg/PlatformPei')
-rw-r--r-- | OvmfPkg/PlatformPei/Fv.c | 6 | ||||
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.c | 2 | ||||
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/OvmfPkg/PlatformPei/Fv.c b/OvmfPkg/PlatformPei/Fv.c index e40c592220..fcf14c88fa 100644 --- a/OvmfPkg/PlatformPei/Fv.c +++ b/OvmfPkg/PlatformPei/Fv.c @@ -22,7 +22,7 @@ **/
EFI_STATUS
PeiFvInitialization (
- VOID
+ IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob
)
{
BOOLEAN SecureS3Needed;
@@ -37,7 +37,7 @@ PeiFvInitialization ( BuildMemoryAllocationHob (
PcdGet32 (PcdOvmfPeiMemFvBase),
PcdGet32 (PcdOvmfPeiMemFvSize),
- mPlatformInfoHob.S3Supported ? EfiACPIMemoryNVS : EfiBootServicesData
+ PlatformInfoHob->S3Supported ? EfiACPIMemoryNVS : EfiBootServicesData
);
//
@@ -45,7 +45,7 @@ PeiFvInitialization ( //
BuildFvHob (PcdGet32 (PcdOvmfDxeMemFvBase), PcdGet32 (PcdOvmfDxeMemFvSize));
- SecureS3Needed = mPlatformInfoHob.S3Supported && mPlatformInfoHob.SmmSmramRequire;
+ SecureS3Needed = PlatformInfoHob->S3Supported && PlatformInfoHob->SmmSmramRequire;
//
// Create a memory allocation HOB for the DXE FV.
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index f2c1e2b213..9646a1fa63 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -372,7 +372,7 @@ InitializePlatform ( ReserveEmuVariableNvStore ();
}
- PeiFvInitialization ();
+ PeiFvInitialization (&mPlatformInfoHob);
MemTypeInfoInitialization ();
MemMapInitialization (&mPlatformInfoHob);
NoexecDxeInitialization ();
diff --git a/OvmfPkg/PlatformPei/Platform.h b/OvmfPkg/PlatformPei/Platform.h index f245025fb4..b13f45ecdb 100644 --- a/OvmfPkg/PlatformPei/Platform.h +++ b/OvmfPkg/PlatformPei/Platform.h @@ -62,7 +62,7 @@ MaxCpuCountInitialization ( EFI_STATUS
PeiFvInitialization (
- VOID
+ IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob
);
VOID
|