]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/CpuMpPei: Correct BIST PPI logic.
authorMarvin H?user <Marvin.Haeuser@outlook.com>
Sat, 21 Jul 2018 22:17:17 +0000 (06:17 +0800)
committerEric Dong <eric.dong@intel.com>
Tue, 24 Jul 2018 00:35:33 +0000 (08:35 +0800)
Currently, the SecPlatformInformation2 PPI is installed when either
there is none present or the present one doesn't lack data.
Update the logic to only install the SecPlatformInformation2 PPI when
it's not already installed so that an up-to-date PPI remains the only
one and unchanged.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
UefiCpuPkg/CpuMpPei/CpuBist.c

index 20728525e2d9f98ed0d126af4a94831b83fd8604..5312d9f01dc8229aa601112e5b471d60d162ddca 100644 (file)
@@ -275,18 +275,20 @@ CollectBistDataFromPpi (
     (UINTN) BistInformationSize\r
     );\r
 \r
-  if (SecPlatformInformation2 != NULL && NumberOfData < NumberOfProcessors) {\r
-    //\r
-    // Reinstall SecPlatformInformation2 PPI to include new BIST information\r
-    //\r
-    Status = PeiServicesReInstallPpi (\r
-               SecInformationDescriptor,\r
-               &mPeiSecPlatformInformation2Ppi\r
-               );\r
-    ASSERT_EFI_ERROR (Status);\r
+  if (SecPlatformInformation2 != NULL) {\r
+    if (NumberOfData < NumberOfProcessors) {\r
+      //\r
+      // Reinstall SecPlatformInformation2 PPI to include new BIST information\r
+      //\r
+      Status = PeiServicesReInstallPpi (\r
+                 SecInformationDescriptor,\r
+                 &mPeiSecPlatformInformation2Ppi\r
+                 );\r
+      ASSERT_EFI_ERROR (Status);\r
+    }\r
   } else {\r
     //\r
-    // Install SecPlatformInformation2 PPI to include new BIST information\r
+    // Install SecPlatformInformation2 PPI\r
     //\r
     Status = PeiServicesInstallPpi (&mPeiSecPlatformInformation2Ppi);\r
     ASSERT_EFI_ERROR(Status);\r