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>
This commit is contained in:
Marvin H?user 2018-07-22 06:17:17 +08:00 committed by Eric Dong
parent 549ae85ce1
commit 005c855dc6
1 changed files with 12 additions and 10 deletions

View File

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