]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuMpPei/CpuBist.c
UefiCpuPkg: Change use of EFI_D_* to DEBUG_*
[mirror_edk2.git] / UefiCpuPkg / CpuMpPei / CpuBist.c
index bf18ca4556c01e64bbae24b71948cf4e803023e0..bb35bb434728bd97af9af5537eadb122f88f0ef5 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
@@ -233,7 +227,7 @@ CollectBistDataFromPpi (
       BspCpuInstance.InfoRecord.IA32HealthFlags.Uint32  = SecPlatformInformation->IA32HealthFlags.Uint32;\r
       CpuInstance = &BspCpuInstance;\r
     } else {\r
-      DEBUG ((EFI_D_INFO, "Does not find any stored CPU BIST information from PPI!\n"));\r
+      DEBUG ((DEBUG_INFO, "Does not find any stored CPU BIST information from PPI!\n"));\r
     }\r
   }\r
   for (ProcessorNumber = 0; ProcessorNumber < NumberOfProcessors; ProcessorNumber ++) {\r
@@ -256,7 +250,7 @@ CollectBistDataFromPpi (
         (EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_SELF_TEST)\r
         );\r
     }\r
-    DEBUG ((EFI_D_INFO, "  APICID - 0x%08x, BIST - 0x%08x\n",\r
+    DEBUG ((DEBUG_INFO, "  APICID - 0x%08x, BIST - 0x%08x\n",\r
             (UINT32) ProcessorInfo.ProcessorId,\r
             BistData\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,21 +269,22 @@ 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
   }\r
 }\r
-\r