On Mon, 2014-11-03 at 08:37 +0000, Fan, Jeff wrote: > Chen, > > Missing parameter description block in function header of > ProcessorToIdleState().
Got it. Thanks, Chen > > Thanks! > Jeff > > -----Original Message----- > From: Chen Fan [mailto:chen.fan.f...@cn.fujitsu.com] > Sent: Monday, October 27, 2014 5:30 PM > To: edk2-devel@lists.sourceforge.net > Cc: Fan, Jeff; Jordan Justen > Subject: [RFC PATCH v6 07/27] UefiCpuPkg/CpuDxe: Switch Ap Stack to NewStack > > All APs use the same common stack to initialization. after initialization, > APs should switch to the stack of its own. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Chen Fan <chen.fan.f...@cn.fujitsu.com> > --- > UefiCpuPkg/CpuDxe/CpuMp.c | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/CpuMp.c index > 611e3d5..956acf4 100644 > --- a/UefiCpuPkg/CpuDxe/CpuMp.c > +++ b/UefiCpuPkg/CpuDxe/CpuMp.c > @@ -25,6 +25,25 @@ VOID *mApStackStart = 0; volatile UINTN > mNumberOfProcessors; > > /** > + Application Processors do loop routine after switch to its own > + stack. > + > +**/ > +VOID > +ProcessorToIdleState ( > + IN VOID *Context1, OPTIONAL > + IN VOID *Context2 OPTIONAL > + ) > +{ > + DEBUG ((DEBUG_INFO, "Ap apicid is %d\n", GetApicId ())); > + > + AsmApDoneWithCommonStack (); > + > + CpuSleep (); > + CpuDeadLoop (); > +} > + > +/** > Application Processor C code entry point. > > **/ > @@ -35,6 +54,13 @@ ApEntryPointInC ( > ) > { > mNumberOfProcessors++; > + mApStackStart = mApStackStart + gApStackSize; > + > + SwitchStack ( > + (SWITCH_STACK_ENTRY_POINT)(UINTN)ProcessorToIdleState, > + NULL, > + NULL, > + mApStackStart); > } > > > -- > 1.9.3 > ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel