diff options
author | Jeff Fan <jeff.fan@intel.com> | 2016-11-04 15:45:13 +0800 |
---|---|---|
committer | Jeff Fan <jeff.fan@intel.com> | 2016-11-09 16:01:13 +0800 |
commit | 14e8137c8223f6d78135af6180b5e3145351da17 (patch) | |
tree | 09abc02974c1b509c4853c25de31bd2a345afd37 /UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | |
parent | b028c1021cdfbfaa0202711f2a008c801752917f (diff) | |
download | edk2-14e8137c8223f6d78135af6180b5e3145351da17.tar.gz edk2-14e8137c8223f6d78135af6180b5e3145351da17.tar.bz2 edk2-14e8137c8223f6d78135af6180b5e3145351da17.zip |
UefiCpuPkg/MpInitLib: Do not wakeup AP if only one processor supported
If MaxLogicalProcessorNumber is only 1, we needn't to wake up APs at all
and needn't to register callback functions.
It could improve boot performance on single supported system.
https://bugzilla.tianocore.org/show_bug.cgi?id=204
Cc: Feng Tian <feng.tian@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library/MpInitLib/DxeMpLib.c')
-rw-r--r-- | UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c index b399f1c24d..eb36d6f78d 100644 --- a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c @@ -290,6 +290,13 @@ InitMpGlobalData ( SaveCpuMpData (CpuMpData);
+ if (CpuMpData->CpuCount == 1) {
+ //
+ // If only BSP exists, return
+ //
+ return;
+ }
+
//
// Avoid APs access invalid buff data which allocated by BootServices,
// so we will allocate reserved data for AP loop code.
|