UefiCpuPkg/CpuDxe: Startup APs

This sequence should happen:
* CpuMp.c: Allocate a stack for the APs
* ApStartup.c: Send Start IPI to wake APs in 16-bit real mode
* MpAsm.S: AP enters CpuDxe driver code without stack
  - AP grabs a lock
  - AP sets up stack
  - AP calls CpuMp.c:ApEntryPointInC

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16370 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Jordan Justen 2014-11-13 18:30:09 +00:00 committed by jljusten
parent cd8c700b03
commit dee9376ffc
1 changed files with 3 additions and 0 deletions

View File

@ -1500,6 +1500,9 @@ InitializeMpSupport (
PrepareAPStartupCode ();
StartApsStackless ();
DEBUG ((DEBUG_INFO, "Detect CPU count: %d\n", mMpSystemData.NumberOfProcessors));
if (mMpSystemData.NumberOfProcessors == 1) {
FreeApStartupCode ();
FreePages (mCommonStack, EFI_SIZE_TO_PAGES (gMaxLogicalProcessorNumber * gApStackSize));