]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/SecCore: get AllSecPpiList after SecPlatformMain.
authorEric Dong <eric.dong@intel.com>
Wed, 28 Aug 2019 06:45:39 +0000 (14:45 +0800)
committerEric Dong <eric.dong@intel.com>
Fri, 30 Aug 2019 13:49:49 +0000 (21:49 +0800)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2136

SecPlatformMain is a platform hook function which let platform does
some update. Some platform may adjust SecCoreData->PeiTemporaryRamBase
which caused former saved AllSecPpiList variable invalid.

This patch update the logic to get AllSecPpiList after SecPlatformMain.
If SecPlatformMain() returns no platform-specific PPI list, then there
is nothing to merge, so we don't need "AllSecPpiList" at all.

Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
UefiCpuPkg/SecCore/SecMain.c

index f91444625780aa23cba4bcd8b8a15a32ac714ae1..66c952b897fafdcbf2dbaca5713ddfac32a2ca0f 100644 (file)
@@ -228,7 +228,6 @@ SecStartupPhase2(
 \r
   PeiCoreEntryPoint = NULL;\r
   SecCoreData   = (EFI_SEC_PEI_HAND_OFF *) Context;\r
-  AllSecPpiList = (EFI_PEI_PPI_DESCRIPTOR *) SecCoreData->PeiTemporaryRamBase;\r
 \r
   //\r
   // Perform platform specific initialization before entering PeiCore.\r
@@ -282,6 +281,8 @@ SecStartupPhase2(
   }\r
 \r
   if (PpiList != NULL) {\r
+    AllSecPpiList = (EFI_PEI_PPI_DESCRIPTOR *) SecCoreData->PeiTemporaryRamBase;\r
+\r
     //\r
     // Remove the terminal flag from the terminal PPI\r
     //\r