]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/CpuDxe: Remove PcdCpuMaxLogicalProcessorNumber consuming
authorJeff Fan <jeff.fan@intel.com>
Tue, 2 Aug 2016 07:04:28 +0000 (15:04 +0800)
committerJeff Fan <jeff.fan@intel.com>
Wed, 17 Aug 2016 12:07:16 +0000 (20:07 +0800)
v5:
  If PcdCpuMaxLogicalProcessorNumber is set to 1 on UP system,
  MpInitLibInitialize() will be invoked. This is one bug, we need to
  call MpInitLibInitialize() always and get the BSP information.
  Just to remove PcdCpuMaxLogicalProcessorNumber() consuming from this
  driver.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Michael Kinney <michael.d.kinney@intel.com>
UefiCpuPkg/CpuDxe/CpuDxe.inf
UefiCpuPkg/CpuDxe/CpuMp.c

index 0adb66b032e607e359fc07dded24e10321be685d..bf389bbbe70b6f0b375e8b24b3a4f10a8ba1802b 100644 (file)
@@ -75,9 +75,6 @@
   gEfiSecPlatformInformation2PpiGuid            ## UNDEFINED # HOB\r
   gEfiSecPlatformInformationPpiGuid             ## UNDEFINED # HOB\r
 \r
-[Pcd]\r
-  gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber    ## CONSUMES\r
-\r
 [Depex]\r
   TRUE\r
 \r
index efab78c83de0cf19c17fe3f39876cd8bc0fdbf4c..f3362613aa5e112f25cbcbd9ebbe7595b6b9eabf 100644 (file)
@@ -613,22 +613,14 @@ InitializeMpSupport (
   UINTN          NumberOfProcessors;\r
   UINTN          NumberOfEnabledProcessors;\r
 \r
-  NumberOfProcessors = (UINTN) PcdGet32 (PcdCpuMaxLogicalProcessorNumber);\r
-  if (NumberOfProcessors < 1) {\r
-    DEBUG ((DEBUG_ERROR, "Setting PcdCpuMaxLogicalProcessorNumber should be more than zero.\n"));\r
-    return;\r
-  }\r
-\r
   //\r
-  // Only perform AP detection if PcdCpuMaxLogicalProcessorNumber is greater than 1\r
+  // Wakeup APs to do initialization\r
   //\r
-  if (NumberOfProcessors > 1) {\r
-    Status = MpInitLibInitialize ();\r
-    ASSERT_EFI_ERROR (Status);\r
+  Status = MpInitLibInitialize ();\r
+  ASSERT_EFI_ERROR (Status);\r
 \r
-    MpInitLibGetNumberOfProcessors (&NumberOfProcessors, &NumberOfEnabledProcessors);\r
-    mNumberOfProcessors = NumberOfProcessors;\r
-  }\r
+  MpInitLibGetNumberOfProcessors (&NumberOfProcessors, &NumberOfEnabledProcessors);\r
+  mNumberOfProcessors = NumberOfProcessors;\r
   DEBUG ((EFI_D_ERROR, "Detect CPU count: %d\n", mNumberOfProcessors));\r
 \r
   //\r