summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin H?user <Marvin.Haeuser@outlook.com>2018-07-22 06:17:17 +0800
committerEric Dong <eric.dong@intel.com>2018-07-24 08:35:33 +0800
commit005c855dc6be0f61f76de0d7ec4a62ee737518d6 (patch)
treeae1d55d0835c5decd3d34142519768d1c8050147
parent549ae85ce1b00228c3abcf6a9e4022c4f4fba5ed (diff)
downloadedk2-005c855dc6be0f61f76de0d7ec4a62ee737518d6.tar.gz
edk2-005c855dc6be0f61f76de0d7ec4a62ee737518d6.tar.bz2
edk2-005c855dc6be0f61f76de0d7ec4a62ee737518d6.zip
UefiCpuPkg/CpuMpPei: Correct BIST PPI logic.
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>
-rw-r--r--UefiCpuPkg/CpuMpPei/CpuBist.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/UefiCpuPkg/CpuMpPei/CpuBist.c b/UefiCpuPkg/CpuMpPei/CpuBist.c
index 20728525e2..5312d9f01d 100644
--- a/UefiCpuPkg/CpuMpPei/CpuBist.c
+++ b/UefiCpuPkg/CpuMpPei/CpuBist.c
@@ -275,18 +275,20 @@ CollectBistDataFromPpi (
(UINTN) BistInformationSize
);
- if (SecPlatformInformation2 != NULL && NumberOfData < NumberOfProcessors) {
- //
- // Reinstall SecPlatformInformation2 PPI to include new BIST information
- //
- Status = PeiServicesReInstallPpi (
- SecInformationDescriptor,
- &mPeiSecPlatformInformation2Ppi
- );
- ASSERT_EFI_ERROR (Status);
+ if (SecPlatformInformation2 != NULL) {
+ if (NumberOfData < NumberOfProcessors) {
+ //
+ // Reinstall SecPlatformInformation2 PPI to include new BIST information
+ //
+ Status = PeiServicesReInstallPpi (
+ SecInformationDescriptor,
+ &mPeiSecPlatformInformation2Ppi
+ );
+ ASSERT_EFI_ERROR (Status);
+ }
} else {
//
- // Install SecPlatformInformation2 PPI to include new BIST information
+ // Install SecPlatformInformation2 PPI
//
Status = PeiServicesInstallPpi (&mPeiSecPlatformInformation2Ppi);
ASSERT_EFI_ERROR(Status);