From: Jordan Justen <[email protected]> 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 <[email protected]> --- 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 ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
