On Fri, 2014-09-12 at 01:56 +0000, Fan, Jeff wrote: > I abstract the questions for response in new mail body. > > > > Why did you get rid of sending IPI to wake up APs? Do you encounter any > > > issue with it? > > > From your patch, I don't know why StarupThisAP () cannot work correctly. > > > Could you send me your AP routine test code and test procedure? > [Chen] I use the StartCorePkg to test Mp service. which is located at > https://svn.code.sf.net/p/edk2-startcore/code/StartCorePkg > I found that after APs run a period of time, they failed assert at > MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c: (163) I don't know why. but > if I got rid of frequent lock requests. > at Ap-loop. it can largely reduce the chance of assertion. > [Jeff] a. Have you observe this issue when you use sending IPI method? > b. Please add volatile for the Procedure and Parameter in > CPU_DATA_BLOCK and take a try. > EFI_AP_PROCEDURE volatile Procedure; > VOID volatile *Parameter; [Chen] Ok, I will make a try. and Andrew has said a method to test in previous mail. I will try it too.
> > > > 3. Why free AP stack at end of code InitializeMpSupport()? I think AP > > > stack should be used by APs during whole POST phase. > > > FreePages (mCommonStack, EFI_SIZE_TO_PAGES (AP_STACK_SIZE)); > [Chen] I think the CommonStack is used for StartupApStackLess. if AP has > switched to its' own stack. the common stack should free. right? > [Jeff] I got it, thanks. > How many APs you tested on OVMF? I suspect there is one gap in > ApEntryPointInC() if there are more than one AP, as below. > AsmApDoneWithCommonStack (); > /* Wait for all Aps complete to initialization */ > while (!mAllApsInitFinished); > /* Switch to stack of the Ap's own */ > AsmApSwitchStack (). > All APs will be synced before AsmApSwitchStack() and then to switch > to use their own stacks. But they will use the same stack to save return > address and parameters(IA32 arch) when invoking AsmApSwitchStack(). [Chen]I have tested 3-4 APs, at the beginning of function AsmApSwitchStack() I add a lock to avoid APs switch stack synchronized. I tested this on X64 arch. it was OK, on Ia32 arch I found BSP was hung at the time of checking all ap switching stack were done or not. maybe the gap is the root reason. I will think about it. thanks. Chen > > Thanks! > Jeff ------------------------------------------------------------------------------ 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
