diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2022-12-02 14:10:02 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-12-14 17:45:41 +0000 |
commit | cc6efda7770b8cabea3ae8c6054d47c4a8e229c3 (patch) | |
tree | 63837c26d810dc56489b245b3b29d798aa3e545e /OvmfPkg/PlatformPei | |
parent | 27874a382c38a95d3ab613eebd35c152ca9b3897 (diff) | |
download | edk2-cc6efda7770b8cabea3ae8c6054d47c4a8e229c3.tar.gz edk2-cc6efda7770b8cabea3ae8c6054d47c4a8e229c3.tar.bz2 edk2-cc6efda7770b8cabea3ae8c6054d47c4a8e229c3.zip |
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>
Diffstat (limited to 'OvmfPkg/PlatformPei')
-rw-r--r-- | OvmfPkg/PlatformPei/MemTypeInfo.c | 4 | ||||
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.c | 2 | ||||
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/OvmfPkg/PlatformPei/MemTypeInfo.c b/OvmfPkg/PlatformPei/MemTypeInfo.c index c8fcf17326..eb37febb31 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 4cd77fd5f8..85b47e7ed8 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -373,7 +373,7 @@ InitializePlatform ( }
PeiFvInitialization (&mPlatformInfoHob);
- MemTypeInfoInitialization ();
+ MemTypeInfoInitialization (&mPlatformInfoHob);
MemMapInitialization (&mPlatformInfoHob);
NoexecDxeInitialization ();
}
diff --git a/OvmfPkg/PlatformPei/Platform.h b/OvmfPkg/PlatformPei/Platform.h index d0c673c5a3..0c0558f062 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
|