From 0a55f3bd65783b4a8142719e257d1d49048318ce Mon Sep 17 00:00:00 2001 From: Jeff Fan Date: Tue, 2 Aug 2016 15:04:28 +0800 Subject: UefiCpuPkg/CpuDxe: Remove PcdCpuMaxLogicalProcessorNumber consuming 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 Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan Reviewed-by: Michael Kinney Tested-by: Laszlo Ersek Tested-by: Michael Kinney --- UefiCpuPkg/CpuDxe/CpuDxe.inf | 3 --- UefiCpuPkg/CpuDxe/CpuMp.c | 18 +++++------------- 2 files changed, 5 insertions(+), 16 deletions(-) (limited to 'UefiCpuPkg') diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.inf b/UefiCpuPkg/CpuDxe/CpuDxe.inf index 0adb66b032..bf389bbbe7 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.inf +++ b/UefiCpuPkg/CpuDxe/CpuDxe.inf @@ -75,9 +75,6 @@ gEfiSecPlatformInformation2PpiGuid ## UNDEFINED # HOB gEfiSecPlatformInformationPpiGuid ## UNDEFINED # HOB -[Pcd] - gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber ## CONSUMES - [Depex] TRUE diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/CpuMp.c index efab78c83d..f3362613aa 100644 --- a/UefiCpuPkg/CpuDxe/CpuMp.c +++ b/UefiCpuPkg/CpuDxe/CpuMp.c @@ -613,22 +613,14 @@ InitializeMpSupport ( UINTN NumberOfProcessors; UINTN NumberOfEnabledProcessors; - NumberOfProcessors = (UINTN) PcdGet32 (PcdCpuMaxLogicalProcessorNumber); - if (NumberOfProcessors < 1) { - DEBUG ((DEBUG_ERROR, "Setting PcdCpuMaxLogicalProcessorNumber should be more than zero.\n")); - return; - } - // - // Only perform AP detection if PcdCpuMaxLogicalProcessorNumber is greater than 1 + // Wakeup APs to do initialization // - if (NumberOfProcessors > 1) { - Status = MpInitLibInitialize (); - ASSERT_EFI_ERROR (Status); + Status = MpInitLibInitialize (); + ASSERT_EFI_ERROR (Status); - MpInitLibGetNumberOfProcessors (&NumberOfProcessors, &NumberOfEnabledProcessors); - mNumberOfProcessors = NumberOfProcessors; - } + MpInitLibGetNumberOfProcessors (&NumberOfProcessors, &NumberOfEnabledProcessors); + mNumberOfProcessors = NumberOfProcessors; DEBUG ((EFI_D_ERROR, "Detect CPU count: %d\n", mNumberOfProcessors)); // -- cgit v1.2.3