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 ();