On Wed, 2014-09-24 at 15:30 -0700, Jordan Justen wrote: 
> On 2014-09-17 20:12:15, Chen Fan wrote:
> > when Ap graps a lock and call CpuMp.c:ApEntryPointInC,
> > it should switch to stack of its' own and release the
> > lock to let others Ap call CpuMp.c:ApEntryPointInC
> > sequential. and StartCode should be not freed.
> > 
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Chen Fan <[email protected]>
> > ---
> >  UefiCpuPkg/CpuDxe/CpuMp.c |  4 ++++
> >  UefiCpuPkg/CpuDxe/CpuMp.h | 15 +++++++++++++++
> >  2 files changed, 19 insertions(+)
> > 
> > diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/CpuMp.c
> > index f8d00df..f732ae5 100644
> > --- a/UefiCpuPkg/CpuDxe/CpuMp.c
> > +++ b/UefiCpuPkg/CpuDxe/CpuMp.c
> > @@ -29,6 +29,10 @@ ApEntryPointInC (
> >    VOID
> >    )
> >  {
> > +  /* Ap initialization */
> > +  AsmApDoneWithCommonStack ();
> > +
> > +  CpuDeadLoop ();
> 
> How about you add your support, in between
> "UefiCpuPkg/CpuDxe: Add StartApsStackless routine"
>  and
> "UefiCpuPkg/CpuDxe: Startup APs"
> 
> This way you add all the support, but don't try to start the APs until
> the support is in place. (Think about the case where someone checks
> out the tree in the middle of your series. You wouldn't want it to
> break the build, or hang the boot.)
> 
> I think you should also add the install of gEfiMpServiceProtocolGuid
> just after the "UefiCpuPkg/CpuDxe: Startup APs" patch. You can build
> up the support for the protocol in pieces, and only install it after
> it is finished and the APs are being started up.

It's a good point. I will change the order of the patches.

Thanks,
Chen

> 
> -Jordan
> 
> >  }
> >  
> >  
> > diff --git a/UefiCpuPkg/CpuDxe/CpuMp.h b/UefiCpuPkg/CpuDxe/CpuMp.h
> > index 41b3ef5..d7bd825 100644
> > --- a/UefiCpuPkg/CpuDxe/CpuMp.h
> > +++ b/UefiCpuPkg/CpuDxe/CpuMp.h
> > @@ -60,5 +60,20 @@ AsmApEntryPoint (
> >    VOID
> >    );
> >  
> > +/**
> > +  Indicate that the AP is no longer using the common stack, and another
> > +  may therefore proceed to use the common stack and then call
> > +  ApEntryPointInC().
> > +
> > +  The processor jumps to this code in flat mode, but the processor's
> > +  stack is not initialized.
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +AsmApDoneWithCommonStack (
> > +  VOID
> > +  );
> > +
> >  #endif // _CPU_MP_H_
> >  
> > -- 
> > 1.9.3
> > 

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to