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;

> > 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().

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

Reply via email to