diff options
author | Chen Fan <chen.fan.fnst@cn.fujitsu.com> | 2015-03-09 06:38:16 +0000 |
---|---|---|
committer | vanjeff <vanjeff@Edk2> | 2015-03-09 06:38:16 +0000 |
commit | e033a1a83e84effb893899d9272778be5d7f2e1f (patch) | |
tree | 8853368d151a6140eb2d8108b984fbaec858c4b1 /UefiCpuPkg | |
parent | b302a9784cc0926d1870cabf95f272cf2f4ce345 (diff) | |
download | edk2-e033a1a83e84effb893899d9272778be5d7f2e1f.zip edk2-e033a1a83e84effb893899d9272778be5d7f2e1f.tar.gz edk2-e033a1a83e84effb893899d9272778be5d7f2e1f.tar.bz2 |
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
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/CpuDxe/CpuMp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/CpuMp.c index 25b6fcb..25c9091 100644 --- a/UefiCpuPkg/CpuDxe/CpuMp.c +++ b/UefiCpuPkg/CpuDxe/CpuMp.c @@ -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);
+ if (CpuData->State == CpuStateBusy) {
+ CpuData->Procedure = NULL;
+ }
CpuData->State = CpuStateIdle;
- CpuData->Procedure = NULL;
ReleaseMpSpinLock (CpuData);
while (TRUE) {
@@ -1190,6 +1193,8 @@ ProcessorToIdleState ( ReleaseMpSpinLock (CpuData);
if (Procedure != NULL) {
+ SetApState (CpuData, CpuStateBusy);
+
Procedure (ProcedureArgument);
GetMpSpinLock (CpuData);
|