}\r
}\r
}\r
- SetApState (&CpuMpData->CpuData[ProcessorNumber], CpuStateFinished);\r
+ SetApState (&CpuMpData->CpuData[ProcessorNumber], CpuStateIdle);\r
}\r
}\r
\r
CpuData = &CpuMpData->CpuData[ProcessorNumber];\r
\r
//\r
- // Check the CPU state of AP. If it is CpuStateFinished, then the AP has finished its task.\r
+ // Check the CPU state of AP. If it is CpuStateIdle, then the AP has finished its task.\r
// Only BSP and corresponding AP access this unit of CPU Data. This means the AP will not modify the\r
- // value of state after setting the it to CpuStateFinished, so BSP can safely make use of its value.\r
+ // value of state after setting the it to CpuStateIdle, so BSP can safely make use of its value.\r
//\r
//\r
// If the AP finishes for StartupThisAP(), return EFI_SUCCESS.\r
//\r
- if (GetApState(CpuData) == CpuStateFinished) {\r
+ if (GetApState(CpuData) == CpuStateIdle) {\r
if (CpuData->Finished != NULL) {\r
*(CpuData->Finished) = TRUE;\r
}\r
- SetApState (CpuData, CpuStateIdle);\r
return EFI_SUCCESS;\r
} else {\r
//\r
\r
CpuData = &CpuMpData->CpuData[ProcessorNumber];\r
//\r
- // Check the CPU state of AP. If it is CpuStateFinished, then the AP has finished its task.\r
+ // Check the CPU state of AP. If it is CpuStateIdle, then the AP has finished its task.\r
// Only BSP and corresponding AP access this unit of CPU Data. This means the AP will not modify the\r
- // value of state after setting the it to CpuStateFinished, so BSP can safely make use of its value.\r
+ // value of state after setting the it to CpuStateIdle, so BSP can safely make use of its value.\r
//\r
- if (GetApState(CpuData) == CpuStateFinished) {\r
+ if (GetApState(CpuData) == CpuStateIdle) {\r
CpuMpData->RunningCount ++;\r
CpuMpData->CpuData[ProcessorNumber].Waiting = FALSE;\r
- SetApState(CpuData, CpuStateIdle);\r
\r
//\r
// If in Single Thread mode, then search for the next waiting AP for execution.\r
//\r
// Wait for old BSP finished AP task\r
//\r
- while (GetApState (&CpuMpData->CpuData[CallerNumber]) != CpuStateFinished) {\r
+ while (GetApState (&CpuMpData->CpuData[CallerNumber]) != CpuStateIdle) {\r
CpuPause ();\r
}\r
\r