summaryrefslogtreecommitdiff
path: root/OvmfPkg
diff options
context:
space:
mode:
authorMichael Kinney <michael.d.kinney@intel.com>2015-10-19 19:08:28 +0000
committermdkinney <mdkinney@Edk2>2015-10-19 19:08:28 +0000
commit1aa6bf528926f8f012a0f2a77bdf53374551a9ec (patch)
treead23995906d417e90267e62df47d50dc5fd983d3 /OvmfPkg
parent1e410eadd80c328e66868263b3006a274ce81ae0 (diff)
downloadedk2-platforms-1aa6bf528926f8f012a0f2a77bdf53374551a9ec.tar.xz
UefiCpuPkg: CpuDxe: Wait for APs to enter idle loop
Address a race condition in first call to StartupAllAPs() with SingleThread set to TRUE in the MP initialization. If the APs have not entered their idle loop before StartupAllAPs() is called, then some of the APs will be in an unexpected state, and StartupAllAPs() will hang. This is the hang condition that is only seen when SingleThread parameter is set to TRUE and StartupAllAPs() is called very shortly after mAPsAlreadyInitFinished is set to TRUE that releases the APs to complete their initialization. An internal function has been added to check if all APs are in the sleeping state in their idle loop. On the first call to StartupAllAPs(), this internal function is used in a loop to make sure the APs are in a state that is compatible with the use of StartupAllAPs(). PcdCpuApInitTimeOutInMicroSeconds is used as the maximum wait time for the APs to enter their idle loop. If all APs have not entered their idle loop within the timeout, then an ASSERT() is generated. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18631 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg')
0 files changed, 0 insertions, 0 deletions