From: Jordan Justen <jordan.l.jus...@intel.com> 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.jus...@intel.com> --- UefiCpuPkg/CpuDxe/CpuMp.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/CpuMp.c index cb63b24..1d1ed3a 100644 --- a/UefiCpuPkg/CpuDxe/CpuMp.c +++ b/UefiCpuPkg/CpuDxe/CpuMp.c @@ -33,5 +33,16 @@ InitializeMpSupport ( VOID ) { + mCommonStack = AllocatePages (EFI_SIZE_TO_PAGES (SIZE_64KB)); + mTopOfApCommonStack = (VOID*) ((UINTN)mCommonStack + SIZE_64KB); + if (mCommonStack == NULL) { + return; + } + + StartApsStackless (AsmApEntryPoint); + + mTopOfApCommonStack = NULL; + FreePages (mCommonStack, EFI_SIZE_TO_PAGES (SIZE_64KB)); + mCommonStack = NULL; } -- 1.9.3 ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel