79 lines
2.5 KiB
Diff
79 lines
2.5 KiB
Diff
|
From 8d45eeb9bbec1085b31b8b5ede6145bf9458566c Mon Sep 17 00:00:00 2001
|
||
|
From: Gerd Hoffmann <kraxel@redhat.com>
|
||
|
Date: Fri, 2 Dec 2022 14:09:59 +0100
|
||
|
Subject: [PATCH 21/32] 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>
|
||
|
(cherry picked from commit 9d9d15b42a5e13bb18729da0f608c629aa274e80)
|
||
|
---
|
||
|
OvmfPkg/PlatformPei/Platform.h | 2 +-
|
||
|
OvmfPkg/PlatformPei/Fv.c | 6 +++---
|
||
|
OvmfPkg/PlatformPei/Platform.c | 2 +-
|
||
|
3 files changed, 5 insertions(+), 5 deletions(-)
|
||
|
|
||
|
diff --git a/OvmfPkg/PlatformPei/Platform.h b/OvmfPkg/PlatformPei/Platform.h
|
||
|
index f245025fb46f..b13f45ecdb69 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
|
||
|
diff --git a/OvmfPkg/PlatformPei/Fv.c b/OvmfPkg/PlatformPei/Fv.c
|
||
|
index e40c5922206b..fcf14c88faa7 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 14a75d40c005..5ecd5d8b1ab6 100644
|
||
|
--- a/OvmfPkg/PlatformPei/Platform.c
|
||
|
+++ b/OvmfPkg/PlatformPei/Platform.c
|
||
|
@@ -384,7 +384,7 @@ InitializePlatform (
|
||
|
ReserveEmuVariableNvStore ();
|
||
|
}
|
||
|
|
||
|
- PeiFvInitialization ();
|
||
|
+ PeiFvInitialization (&mPlatformInfoHob);
|
||
|
MemTypeInfoInitialization ();
|
||
|
MemMapInitialization (&mPlatformInfoHob);
|
||
|
NoexecDxeInitialization ();
|
||
|
--
|
||
|
2.38.1
|
||
|
|