It's good. Reviewed-by: Jeff Fan <jeff....@intel.com>
-----Original Message----- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Saturday, May 09, 2015 2:52 AM To: edk2-devel@lists.sourceforge.net Cc: Fan, Jeff; Chen Fan; Justen, Jordan L Subject: [PATCH 11/11] UefiCpuPkg: CpuDxe: provide EFI_MP_SERVICES_PROTOCOL when there's no AP EFI_MP_SERVICES_PROTOCOL can be provided even when the system has only one logical processor (the BSP); the behavior of EFI_MP_SERVICES_PROTOCOL member functions is well defined. Some drivers (will) depend on the presence of EFI_MP_SERVICES_PROTOCOL even if there's just a BSP, so let's install this protocol under such circumstances too. After reviewing the implementation for the (mMpSystemData.NumberOfProcessors == 1) case, the above goal seems safely reachable by removing the explicit restrictions under that condition. Cc: Jeff Fan <jeff....@intel.com> Cc: Chen Fan <chen.fan.f...@cn.fujitsu.com> Cc: Jordan Justen <jordan.l.jus...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <ler...@redhat.com> --- UefiCpuPkg/CpuDxe/CpuMp.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/CpuMp.c index ee6fd5c..20234e7 100644 --- a/UefiCpuPkg/CpuDxe/CpuMp.c +++ b/UefiCpuPkg/CpuDxe/CpuMp.c @@ -1561,10 +1561,6 @@ InitializeMpSupport ( return; } - if (gMaxLogicalProcessorNumber == 1) { - return; - } - gApStackSize = (UINTN) PcdGet32 (PcdCpuApStackSize); ASSERT ((gApStackSize & (SIZE_4KB - 1)) == 0); @@ -1586,11 +1582,6 @@ InitializeMpSupport ( StartApsStackless (); DEBUG ((DEBUG_INFO, "Detect CPU count: %d\n", mMpSystemData.NumberOfProcessors)); - if (mMpSystemData.NumberOfProcessors == 1) { - FreeApStartupCode (); - FreePages (mCommonStack, EFI_SIZE_TO_PAGES (gMaxLogicalProcessorNumber * gApStackSize)); - return; - } mMpSystemData.CpuDatas = ReallocatePool ( sizeof (CPU_DATA_BLOCK) * gMaxLogicalProcessorNumber, @@ -1612,7 +1603,7 @@ InitializeMpSupport ( &MtrrSettings, // ProcedureArgument NULL // FailedCpuList ); - ASSERT_EFI_ERROR (Status); + ASSERT (Status == EFI_SUCCESS || Status == EFI_NOT_STARTED); Status = gBS->InstallMultipleProtocolInterfaces ( &mMpServiceHandle, -- 1.8.3.1 ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel