68 lines
2.3 KiB
Diff
68 lines
2.3 KiB
Diff
|
From 63ce5d51b90f213ec2281b6da8c1def59f9acaf8 Mon Sep 17 00:00:00 2001
|
||
|
From: Gerd Hoffmann <kraxel@redhat.com>
|
||
|
Date: Fri, 2 Dec 2022 14:10:02 +0100
|
||
|
Subject: [PATCH 24/32] OvmfPkg/PlatformPei: MemTypeInfo: stop using
|
||
|
mPlatformInfoHob
|
||
|
|
||
|
Stop using the mPlatformInfoHob global variable in MemTypeInfoInitialization()
|
||
|
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 cc6efda7770b8cabea3ae8c6054d47c4a8e229c3)
|
||
|
---
|
||
|
OvmfPkg/PlatformPei/Platform.h | 2 +-
|
||
|
OvmfPkg/PlatformPei/MemTypeInfo.c | 4 ++--
|
||
|
OvmfPkg/PlatformPei/Platform.c | 2 +-
|
||
|
3 files changed, 4 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/OvmfPkg/PlatformPei/Platform.h b/OvmfPkg/PlatformPei/Platform.h
|
||
|
index d0c673c5a346..0c0558f0626c 100644
|
||
|
--- a/OvmfPkg/PlatformPei/Platform.h
|
||
|
+++ b/OvmfPkg/PlatformPei/Platform.h
|
||
|
@@ -67,7 +67,7 @@ PeiFvInitialization (
|
||
|
|
||
|
VOID
|
||
|
MemTypeInfoInitialization (
|
||
|
- VOID
|
||
|
+ IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob
|
||
|
);
|
||
|
|
||
|
VOID
|
||
|
diff --git a/OvmfPkg/PlatformPei/MemTypeInfo.c b/OvmfPkg/PlatformPei/MemTypeInfo.c
|
||
|
index c8fcf1732687..eb37febb31ae 100644
|
||
|
--- a/OvmfPkg/PlatformPei/MemTypeInfo.c
|
||
|
+++ b/OvmfPkg/PlatformPei/MemTypeInfo.c
|
||
|
@@ -203,12 +203,12 @@ STATIC CONST EFI_PEI_NOTIFY_DESCRIPTOR mReadOnlyVariable2Notify = {
|
||
|
|
||
|
VOID
|
||
|
MemTypeInfoInitialization (
|
||
|
- VOID
|
||
|
+ IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob
|
||
|
)
|
||
|
{
|
||
|
EFI_STATUS Status;
|
||
|
|
||
|
- if (!mPlatformInfoHob.SmmSmramRequire) {
|
||
|
+ if (!PlatformInfoHob->SmmSmramRequire) {
|
||
|
//
|
||
|
// EFI_PEI_READ_ONLY_VARIABLE2_PPI will never be available; install
|
||
|
// the default memory type information HOB right away.
|
||
|
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
|
||
|
index 0d5ead724d3f..c0273091326c 100644
|
||
|
--- a/OvmfPkg/PlatformPei/Platform.c
|
||
|
+++ b/OvmfPkg/PlatformPei/Platform.c
|
||
|
@@ -385,7 +385,7 @@ InitializePlatform (
|
||
|
}
|
||
|
|
||
|
PeiFvInitialization (&mPlatformInfoHob);
|
||
|
- MemTypeInfoInitialization ();
|
||
|
+ MemTypeInfoInitialization (&mPlatformInfoHob);
|
||
|
MemMapInitialization (&mPlatformInfoHob);
|
||
|
NoexecDxeInitialization ();
|
||
|
UPDATE_BOOLEAN_PCD_FROM_FW_CFG (PcdResizeXterm);
|
||
|
--
|
||
|
2.38.1
|
||
|
|