mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/MpService: put AP to busy state when execution
CpuState should follow the process? Idle -> Ready -> Busy -> Finished ^ | | | + - - - - - - - - - - - - + Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17022 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
b302a9784c
commit
e033a1a83e
|
@ -1176,11 +1176,14 @@ ProcessorToIdleState (
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Avoid forcibly reset AP caused the AP State is not updated.
|
// Avoid forcibly reset AP caused the timeout AP State is not
|
||||||
|
// updated.
|
||||||
//
|
//
|
||||||
GetMpSpinLock (CpuData);
|
GetMpSpinLock (CpuData);
|
||||||
CpuData->State = CpuStateIdle;
|
if (CpuData->State == CpuStateBusy) {
|
||||||
CpuData->Procedure = NULL;
|
CpuData->Procedure = NULL;
|
||||||
|
}
|
||||||
|
CpuData->State = CpuStateIdle;
|
||||||
ReleaseMpSpinLock (CpuData);
|
ReleaseMpSpinLock (CpuData);
|
||||||
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
|
@ -1190,6 +1193,8 @@ ProcessorToIdleState (
|
||||||
ReleaseMpSpinLock (CpuData);
|
ReleaseMpSpinLock (CpuData);
|
||||||
|
|
||||||
if (Procedure != NULL) {
|
if (Procedure != NULL) {
|
||||||
|
SetApState (CpuData, CpuStateBusy);
|
||||||
|
|
||||||
Procedure (ProcedureArgument);
|
Procedure (ProcedureArgument);
|
||||||
|
|
||||||
GetMpSpinLock (CpuData);
|
GetMpSpinLock (CpuData);
|
||||||
|
|
Loading…
Reference in New Issue