]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuMpPei/CpuBist.c
UefiCpuPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / UefiCpuPkg / CpuMpPei / CpuBist.c
index bf18ca4556c01e64bbae24b71948cf4e803023e0..159fa5cd1fa7d69d867b44d7211078523e9c7bd9 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
   Update and publish processors' BIST information.\r
 \r
-  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -179,7 +173,7 @@ CollectBistDataFromPpi (
   UINTN                                 BistInformationSize;\r
   EFI_SEC_PLATFORM_INFORMATION_RECORD2  *PlatformInformationRecord2;\r
   EFI_SEC_PLATFORM_INFORMATION_CPU      *CpuInstanceInHob;\r
-  \r
+\r
 \r
   MpInitLibGetNumberOfProcessors(&NumberOfProcessors, &NumberOfEnabledProcessors);\r
 \r
@@ -264,7 +258,7 @@ CollectBistDataFromPpi (
     CpuInstanceInHob[ProcessorNumber].CpuLocation = (UINT32) ProcessorInfo.ProcessorId;\r
     CpuInstanceInHob[ProcessorNumber].InfoRecord.IA32HealthFlags = BistData;\r
   }\r
\r
+\r
   //\r
   // Build SecPlatformInformation2 PPI GUIDed HOB that also could be consumed\r
   // by CPU MP driver to get CPU BIST data\r
@@ -275,18 +269,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