audk/UefiCpuPkg/Library
Laszlo Ersek 6e1987f19a UefiCpuPkg/MpInitLib: wait no longer than necessary for initial AP startup
Sometimes a platform knows exactly how many CPUs it has at boot. It should
be able to
- set PcdCpuMaxLogicalProcessorNumber dynamically to this number,
- set PcdCpuApInitTimeOutInMicroSeconds to a very long time (for example
  MAX_UINT32, approx. 71 minutes),
- and expect that MpInitLib wait exactly as long as necessary for all APs
  to report in.

Other platforms should be able to continue setting a reasonably large
upper bound on supported CPUs, and waiting for a reasonable, fixed amount
of time for all APs to report in.

Add this functionality. The TimedWaitForApFinish() function will return
when all APs have reported in, or the timeout has expired -- whichever
happens first.

(Accessing these PCDs dynamically is safe. The PEI and DXE phase instances
of this library are restricted to PEIM and DXE_DRIVER client modules, thus
the PCD accesses cannot be linked into runtime code.)

Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=116
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-11-29 10:05:52 +01:00
..
BaseUefiCpuLib UefiCpuPkg BaseUefiCpuLib: Add nasm source file in BaseUefiCpuLib.inf 2016-06-28 09:52:08 +08:00
BaseXApicLib UefiCpuPkg/LocalApicLib: fix feature test for Extended Topology CPUID leaf 2016-11-23 21:41:05 +01:00
BaseXApicX2ApicLib UefiCpuPkg/LocalApicLib: fix feature test for Extended Topology CPUID leaf 2016-11-23 21:41:05 +01:00
CpuExceptionHandlerLib UefiCpuPkg PeiCpuExceptionHandlerLib: Add the missing nasm files in INF 2016-11-03 10:28:40 +08:00
MpInitLib UefiCpuPkg/MpInitLib: wait no longer than necessary for initial AP startup 2016-11-29 10:05:52 +01:00
MtrrLib UefiCpuPkg: Fix typos in comments 2016-10-24 09:09:48 +08:00
PlatformSecLibNull UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00
SecPeiDxeTimerLibUefiCpu UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00
SmmCpuFeaturesLib UefiCpuPkg/SmmCpuFeaturesLib: Add SMRR PhysBase/PhysMask fields check 2016-05-19 10:04:27 -07:00
SmmCpuPlatformHookLibNull UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00