On Sep 11, 2014, at 2:43 AM, Chen, Fan <[email protected]> wrote:

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

The issue is the IoLib depends on the DebugLib. If the DebugLib instance in 
your driver is not MP safe (no a module type of BASE) then the code is not MP 
safe.


https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c
UINT32
EFIAPI
IoRead32 (
  IN      UINTN                     Port
  )
{
  UINT32   Data;

  ASSERT ((Port & 3) == 0);
  __asm__ __volatile__ ("inl %w1,%0" : "=a" (Data) : "d" ((UINT16)Port));
  return Data;
}
https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
[LibraryClasses]
  DebugLib
  BaseLib
If you add --report-file=build.log to the build command you can see what 
instance of the DebugLib is being used with your driver in the build.log file.

Thanks,

Andrew Fish

------------------------------------------------------------------------------
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