summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformPei/Platform.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2022-12-02 14:10:03 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-12-14 17:45:41 +0000
commit7dbb8a24d1a3403f85d959bc1234b9f4a92bfbf0 (patch)
tree4047bbd069a8ba8fa4876a6e07ccf7899fa0312b /OvmfPkg/PlatformPei/Platform.c
parentcc6efda7770b8cabea3ae8c6054d47c4a8e229c3 (diff)
downloadedk2-7dbb8a24d1a3403f85d959bc1234b9f4a92bfbf0.tar.gz
edk2-7dbb8a24d1a3403f85d959bc1234b9f4a92bfbf0.tar.bz2
edk2-7dbb8a24d1a3403f85d959bc1234b9f4a92bfbf0.zip
OvmfPkg/PlatformPei: NoExec: stop using mPlatformInfoHob
Stop using the mPlatformInfoHob global variable in NoexecDxeInitialization() 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/Platform.c')
-rw-r--r--OvmfPkg/PlatformPei/Platform.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index 85b47e7ed8..7f3a260926 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -75,16 +75,17 @@ MemMapInitialization (
ASSERT_RETURN_ERROR (PcdStatus);
}
+STATIC
VOID
NoexecDxeInitialization (
- VOID
+ IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob
)
{
RETURN_STATUS Status;
- Status = PlatformNoexecDxeInitialization (&mPlatformInfoHob);
+ Status = PlatformNoexecDxeInitialization (PlatformInfoHob);
if (!RETURN_ERROR (Status)) {
- Status = PcdSetBoolS (PcdSetNxForStack, mPlatformInfoHob.PcdSetNxForStack);
+ Status = PcdSetBoolS (PcdSetNxForStack, PlatformInfoHob->PcdSetNxForStack);
ASSERT_RETURN_ERROR (Status);
}
}
@@ -375,7 +376,7 @@ InitializePlatform (
PeiFvInitialization (&mPlatformInfoHob);
MemTypeInfoInitialization (&mPlatformInfoHob);
MemMapInitialization (&mPlatformInfoHob);
- NoexecDxeInitialization ();
+ NoexecDxeInitialization (&mPlatformInfoHob);
}
InstallClearCacheCallback ();