Stop using the mPlatformInfoHob global variable in MemTypeInfoInitialization()
function. Pass a pointer to the PlatformInfoHob instead.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
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 4cd77fd5f84f..85b47e7ed8df 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -373,7 +373,7 @@ InitializePlatform (
}
PeiFvInitialization (&mPlatformInfoHob);
- MemTypeInfoInitialization ();
+ MemTypeInfoInitialization (&mPlatformInfoHob);
MemMapInitialization (&mPlatformInfoHob);
NoexecDxeInitialization ();
}
--
2.38.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#96907): https://edk2.groups.io/g/devel/message/96907
Mute This Topic: https://groups.io/mt/95405212/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-