]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/CpuDxe: implement Mp Protocol:StartupThisAP()
authorChen Fan <chen.fan.fnst@cn.fujitsu.com>
Thu, 13 Nov 2014 18:27:21 +0000 (18:27 +0000)
committerjljusten <jljusten@Edk2>
Thu, 13 Nov 2014 18:27:21 +0000 (18:27 +0000)
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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16358 6f19259b-4bc3-4df7-8a09-765794883524

UefiCpuPkg/CpuDxe/CpuMp.c
UefiCpuPkg/CpuDxe/CpuMp.h

index 1d3d16bcc06bfa776e1df2f45699dad51aaa205d..552bac3c6dc2c6268a419e4e7a4fcece5e2cba6f 100644 (file)
@@ -17,6 +17,7 @@
 \r
 UINTN gMaxLogicalProcessorNumber;\r
 UINTN gApStackSize;\r
+UINTN gPollInterval = 100; // 100 microseconds\r
 \r
 MP_SYSTEM_DATA mMpSystemData;\r
 \r
@@ -28,7 +29,7 @@ EFI_MP_SERVICES_PROTOCOL  mMpServicesTemplate = {
   GetNumberOfProcessors,\r
   GetProcessorInfo,\r
   NULL, // StartupAllAPs,\r
-  NULL, // StartupThisAP,\r
+  StartupThisAP,\r
   NULL, // SwitchBSP,\r
   EnableDisableAP,\r
   WhoAmI\r
@@ -82,6 +83,52 @@ GetApState (
   return State;\r
 }\r
 \r
+/**\r
+  Set the Application Processors state.\r
+\r
+  @param   CpuData    The pointer to CPU_DATA_BLOCK of specified AP\r
+  @param   State      The AP status\r
+\r
+**/\r
+VOID\r
+SetApState (\r
+  IN  CPU_DATA_BLOCK   *CpuData,\r
+  IN  CPU_STATE        State\r
+  )\r
+{\r
+  while (!AcquireSpinLockOrFail (&CpuData->CpuDataLock)) {\r
+    CpuPause ();\r
+  }\r
+\r
+  CpuData->State = State;\r
+  ReleaseSpinLock (&CpuData->CpuDataLock);\r
+}\r
+\r
+/**\r
+  Set the Application Processor prepare to run a function specified\r
+  by Params.\r
+\r
+  @param CpuData           the pointer to CPU_DATA_BLOCK of specified AP\r
+  @param Procedure         A pointer to the function to be run on enabled APs of the system\r
+  @param ProcedureArgument Pointer to the optional parameter of the assigned function\r
+\r
+**/\r
+VOID\r
+SetApProcedure (\r
+  IN   CPU_DATA_BLOCK        *CpuData,\r
+  IN   EFI_AP_PROCEDURE      Procedure,\r
+  IN   VOID                  *ProcedureArgument\r
+  )\r
+{\r
+  while (!AcquireSpinLockOrFail (&CpuData->CpuDataLock)) {\r
+    CpuPause ();\r
+  }\r
+\r
+  CpuData->Parameter  = ProcedureArgument;\r
+  CpuData->Procedure  = Procedure;\r
+  ReleaseSpinLock (&CpuData->CpuDataLock);\r
+}\r
+\r
 /**\r
   Check the Application Processors Status whether contains the Flags.\r
 \r
@@ -152,6 +199,45 @@ CpuStatusFlagAndNot (
   ReleaseSpinLock (&CpuData->CpuDataLock);\r
 }\r
 \r
+/**\r
+  Searches for the next blocking AP.\r
+\r
+  Search for the next AP that is put in blocking state by single-threaded StartupAllAPs().\r
+\r
+  @param  NextNumber           Pointer to the processor number of the next blocking AP.\r
+\r
+  @retval EFI_SUCCESS          The next blocking AP has been found.\r
+  @retval EFI_NOT_FOUND        No blocking AP exists.\r
+\r
+**/\r
+EFI_STATUS\r
+GetNextBlockedNumber (\r
+  OUT UINTN  *NextNumber\r
+  )\r
+{\r
+  UINTN                 Number;\r
+  CPU_STATE             CpuState;\r
+  CPU_DATA_BLOCK        *CpuData;\r
+\r
+  for (Number = 0; Number < mMpSystemData.NumberOfProcessors; Number++) {\r
+    CpuData = &mMpSystemData.CpuDatas[Number];\r
+    if (TestCpuStatusFlag (CpuData, PROCESSOR_AS_BSP_BIT)) {\r
+      //\r
+      // Skip BSP\r
+      //\r
+      continue;\r
+    }\r
+\r
+    CpuState = GetApState (CpuData);\r
+    if (CpuState == CpuStateBlocked) {\r
+      *NextNumber = Number;\r
+      return EFI_SUCCESS;\r
+    }\r
+  }\r
+\r
+  return EFI_NOT_FOUND;\r
+}\r
+\r
 /**\r
   This service retrieves the number of logical processor in the platform\r
   and the number of those logical processors that are enabled on this boot.\r
@@ -259,6 +345,177 @@ GetProcessorInfo (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  This service lets the caller get one enabled AP to execute a caller-provided\r
+  function. The caller can request the BSP to either wait for the completion\r
+  of the AP or just proceed with the next task by using the EFI event mechanism.\r
+  See EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() for more details on non-blocking\r
+  execution support.  This service may only be called from the BSP.\r
+\r
+  This function is used to dispatch one enabled AP to the function specified by\r
+  Procedure passing in the argument specified by ProcedureArgument.  If WaitEvent\r
+  is NULL, execution is in blocking mode. The BSP waits until the AP finishes or\r
+  TimeoutInMicroSecondss expires. Otherwise, execution is in non-blocking mode.\r
+  BSP proceeds to the next task without waiting for the AP. If a non-blocking mode\r
+  is requested after the UEFI Event EFI_EVENT_GROUP_READY_TO_BOOT is signaled,\r
+  then EFI_UNSUPPORTED must be returned.\r
+\r
+  If the timeout specified by TimeoutInMicroseconds expires before the AP returns\r
+  from Procedure, then execution of Procedure by the AP is terminated. The AP is\r
+  available for subsequent calls to EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() and\r
+  EFI_MP_SERVICES_PROTOCOL.StartupThisAP().\r
+\r
+  @param[in]  This                    A pointer to the EFI_MP_SERVICES_PROTOCOL\r
+                                      instance.\r
+  @param[in]  Procedure               A pointer to the function to be run on\r
+                                      enabled APs of the system. See type\r
+                                      EFI_AP_PROCEDURE.\r
+  @param[in]  ProcessorNumber         The handle number of the AP. The range is\r
+                                      from 0 to the total number of logical\r
+                                      processors minus 1. The total number of\r
+                                      logical processors can be retrieved by\r
+                                      EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors().\r
+  @param[in]  WaitEvent               The event created by the caller with CreateEvent()\r
+                                      service.  If it is NULL, then execute in\r
+                                      blocking mode. BSP waits until all APs finish\r
+                                      or TimeoutInMicroseconds expires.  If it's\r
+                                      not NULL, then execute in non-blocking mode.\r
+                                      BSP requests the function specified by\r
+                                      Procedure to be started on all the enabled\r
+                                      APs, and go on executing immediately. If\r
+                                      all return from Procedure or TimeoutInMicroseconds\r
+                                      expires, this event is signaled. The BSP\r
+                                      can use the CheckEvent() or WaitForEvent()\r
+                                      services to check the state of event.  Type\r
+                                      EFI_EVENT is defined in CreateEvent() in\r
+                                      the Unified Extensible Firmware Interface\r
+                                      Specification.\r
+  @param[in]  TimeoutInMicroseconds   Indicates the time limit in microseconds for\r
+                                      APs to return from Procedure, either for\r
+                                      blocking or non-blocking mode. Zero means\r
+                                      infinity.  If the timeout expires before\r
+                                      all APs return from Procedure, then Procedure\r
+                                      on the failed APs is terminated. All enabled\r
+                                      APs are available for next function assigned\r
+                                      by EFI_MP_SERVICES_PROTOCOL.StartupAllAPs()\r
+                                      or EFI_MP_SERVICES_PROTOCOL.StartupThisAP().\r
+                                      If the timeout expires in blocking mode,\r
+                                      BSP returns EFI_TIMEOUT.  If the timeout\r
+                                      expires in non-blocking mode, WaitEvent\r
+                                      is signaled with SignalEvent().\r
+  @param[in]  ProcedureArgument       The parameter passed into Procedure for\r
+                                      all APs.\r
+  @param[out] Finished                If NULL, this parameter is ignored.  In\r
+                                      blocking mode, this parameter is ignored.\r
+                                      In non-blocking mode, if AP returns from\r
+                                      Procedure before the timeout expires, its\r
+                                      content is set to TRUE. Otherwise, the\r
+                                      value is set to FALSE. The caller can\r
+                                      determine if the AP returned from Procedure\r
+                                      by evaluating this value.\r
+\r
+  @retval EFI_SUCCESS             In blocking mode, specified AP finished before\r
+                                  the timeout expires.\r
+  @retval EFI_SUCCESS             In non-blocking mode, the function has been\r
+                                  dispatched to specified AP.\r
+  @retval EFI_UNSUPPORTED         A non-blocking mode request was made after the\r
+                                  UEFI event EFI_EVENT_GROUP_READY_TO_BOOT was\r
+                                  signaled.\r
+  @retval EFI_DEVICE_ERROR        The calling processor is an AP.\r
+  @retval EFI_TIMEOUT             In blocking mode, the timeout expired before\r
+                                  the specified AP has finished.\r
+  @retval EFI_NOT_READY           The specified AP is busy.\r
+  @retval EFI_NOT_FOUND           The processor with the handle specified by\r
+                                  ProcessorNumber does not exist.\r
+  @retval EFI_INVALID_PARAMETER   ProcessorNumber specifies the BSP or disabled AP.\r
+  @retval EFI_INVALID_PARAMETER   Procedure is NULL.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+StartupThisAP (\r
+  IN  EFI_MP_SERVICES_PROTOCOL  *This,\r
+  IN  EFI_AP_PROCEDURE          Procedure,\r
+  IN  UINTN                     ProcessorNumber,\r
+  IN  EFI_EVENT                 WaitEvent               OPTIONAL,\r
+  IN  UINTN                     TimeoutInMicroseconds,\r
+  IN  VOID                      *ProcedureArgument      OPTIONAL,\r
+  OUT BOOLEAN                   *Finished               OPTIONAL\r
+  )\r
+{\r
+  CPU_DATA_BLOCK        *CpuData;\r
+  EFI_STATUS            Status;\r
+\r
+  CpuData = NULL;\r
+\r
+  if (Finished != NULL) {\r
+    *Finished = FALSE;\r
+  }\r
+\r
+  if (!IsBSP ()) {\r
+    return EFI_DEVICE_ERROR;\r
+  }\r
+\r
+  if (Procedure == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  if (ProcessorNumber >= mMpSystemData.NumberOfProcessors) {\r
+    return EFI_NOT_FOUND;\r
+  }\r
+\r
+  CpuData = &mMpSystemData.CpuDatas[ProcessorNumber];\r
+  if (TestCpuStatusFlag (CpuData, PROCESSOR_AS_BSP_BIT) ||\r
+      !TestCpuStatusFlag (CpuData, PROCESSOR_ENABLED_BIT)) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  if (GetApState (CpuData) != CpuStateIdle) {\r
+    return EFI_NOT_READY;\r
+  }\r
+\r
+  SetApState (CpuData, CpuStateReady);\r
+\r
+  SetApProcedure (CpuData, Procedure, ProcedureArgument);\r
+\r
+  CpuData->Timeout = TimeoutInMicroseconds;\r
+  CpuData->WaitEvent = WaitEvent;\r
+  CpuData->TimeoutActive = !!(TimeoutInMicroseconds);\r
+  CpuData->Finished = Finished;\r
+\r
+  if (WaitEvent != NULL) {\r
+    //\r
+    // Non Blocking\r
+    //\r
+    Status = gBS->SetTimer (\r
+                    CpuData->CheckThisAPEvent,\r
+                    TimerPeriodic,\r
+                    EFI_TIMER_PERIOD_MICROSECONDS (100)\r
+                    );\r
+    return Status;\r
+  }\r
+\r
+  //\r
+  // Blocking\r
+  //\r
+  while (TRUE) {\r
+    if (GetApState (CpuData) == CpuStateFinished) {\r
+      SetApState (CpuData, CpuStateIdle);\r
+      break;\r
+    }\r
+\r
+    if (CpuData->TimeoutActive && CpuData->Timeout < 0) {\r
+      ResetProcessorToIdleState (CpuData);\r
+      return EFI_TIMEOUT;\r
+    }\r
+\r
+    gBS->Stall (gPollInterval);\r
+    CpuData->Timeout -= gPollInterval;\r
+  }\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
 /**\r
   This service lets the caller enable or disable an AP from this point onward.\r
   This service may only be called from the BSP.\r
@@ -397,6 +654,22 @@ WhoAmI (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Terminate AP's task and set it to idle state.\r
+\r
+  This function terminates AP's task due to timeout by sending INIT-SIPI,\r
+  and sends it to idle state.\r
+\r
+  @param CpuData           the pointer to CPU_DATA_BLOCK of specified AP\r
+\r
+**/\r
+VOID\r
+ResetProcessorToIdleState (\r
+  IN CPU_DATA_BLOCK  *CpuData\r
+  )\r
+{\r
+}\r
+\r
 /**\r
   Application Processors do loop routine\r
   after switch to its own stack.\r
@@ -419,6 +692,60 @@ ProcessorToIdleState (
   CpuDeadLoop ();\r
 }\r
 \r
+/**\r
+  Checks AP' status periodically.\r
+\r
+  This function is triggerred by timer perodically to check the\r
+  state of AP forStartupThisAP() executed in non-blocking mode.\r
+\r
+  @param  Event    Event triggered.\r
+  @param  Context  Parameter passed with the event.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+CheckThisAPStatus (\r
+  IN  EFI_EVENT        Event,\r
+  IN  VOID             *Context\r
+  )\r
+{\r
+  CPU_DATA_BLOCK  *CpuData;\r
+  CPU_STATE       CpuState;\r
+\r
+  CpuData = (CPU_DATA_BLOCK *) Context;\r
+  if (CpuData->TimeoutActive) {\r
+    CpuData->Timeout -= gPollInterval;\r
+  }\r
+\r
+  CpuState = GetApState (CpuData);\r
+\r
+  if (CpuState == CpuStateFinished) {\r
+    if (CpuData->Finished) {\r
+      *CpuData->Finished = TRUE;\r
+    }\r
+    SetApState (CpuData, CpuStateIdle);\r
+    goto out;\r
+  }\r
+\r
+  if (CpuData->TimeoutActive && CpuData->Timeout < 0) {\r
+    if (CpuState != CpuStateIdle &&\r
+        CpuData->Finished) {\r
+      *CpuData->Finished = FALSE;\r
+    }\r
+    ResetProcessorToIdleState (CpuData);\r
+    goto out;\r
+  }\r
+\r
+  return;\r
+\r
+out:\r
+  gBS->SetTimer (CpuData->CheckThisAPEvent, TimerCancel, 0);\r
+  if (CpuData->WaitEvent) {\r
+    gBS->SignalEvent (CpuData->WaitEvent);\r
+    CpuData->WaitEvent = NULL;\r
+  }\r
+}\r
+\r
 /**\r
   Application Processor C code entry point.\r
 \r
@@ -492,6 +819,10 @@ InitMpSystemData (
   VOID\r
   )\r
 {\r
+  UINTN          ProcessorNumber;\r
+  CPU_DATA_BLOCK *CpuData;\r
+  EFI_STATUS     Status;\r
+\r
   ZeroMem (&mMpSystemData, sizeof (MP_SYSTEM_DATA));\r
 \r
   mMpSystemData.NumberOfProcessors = 1;\r
@@ -500,6 +831,18 @@ InitMpSystemData (
   mMpSystemData.CpuDatas = AllocateZeroPool (sizeof (CPU_DATA_BLOCK) * gMaxLogicalProcessorNumber);\r
   ASSERT(mMpSystemData.CpuDatas != NULL);\r
 \r
+  for (ProcessorNumber = 0; ProcessorNumber < gMaxLogicalProcessorNumber; ProcessorNumber++) {\r
+    CpuData = &mMpSystemData.CpuDatas[ProcessorNumber];\r
+    Status = gBS->CreateEvent (\r
+                    EVT_TIMER | EVT_NOTIFY_SIGNAL,\r
+                    TPL_CALLBACK,\r
+                    CheckThisAPStatus,\r
+                    (VOID *) CpuData,\r
+                    &CpuData->CheckThisAPEvent\r
+                    );\r
+    ASSERT_EFI_ERROR (Status);\r
+  }\r
+\r
   //\r
   // BSP\r
   //\r
index e4adb3f0e164f3b1ed86f60910100421dd2eae44..6d80f053b4e900055f0fca4c46a823cc6b20eacc 100644 (file)
@@ -97,6 +97,11 @@ typedef struct {
 \r
   EFI_AP_PROCEDURE               Procedure;\r
   VOID                           *Parameter;\r
+  BOOLEAN                        *Finished;\r
+  INTN                           Timeout;\r
+  EFI_EVENT                      WaitEvent;\r
+  BOOLEAN                        TimeoutActive;\r
+  EFI_EVENT                      CheckThisAPEvent;\r
 } CPU_DATA_BLOCK;\r
 \r
 /**\r
@@ -202,6 +207,104 @@ GetProcessorInfo (
   OUT EFI_PROCESSOR_INFORMATION  *ProcessorInfoBuffer\r
   );\r
 \r
+/**\r
+  This service lets the caller get one enabled AP to execute a caller-provided\r
+  function. The caller can request the BSP to either wait for the completion\r
+  of the AP or just proceed with the next task by using the EFI event mechanism.\r
+  See EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() for more details on non-blocking\r
+  execution support.  This service may only be called from the BSP.\r
+\r
+  This function is used to dispatch one enabled AP to the function specified by\r
+  Procedure passing in the argument specified by ProcedureArgument.  If WaitEvent\r
+  is NULL, execution is in blocking mode. The BSP waits until the AP finishes or\r
+  TimeoutInMicroSecondss expires. Otherwise, execution is in non-blocking mode.\r
+  BSP proceeds to the next task without waiting for the AP. If a non-blocking mode\r
+  is requested after the UEFI Event EFI_EVENT_GROUP_READY_TO_BOOT is signaled,\r
+  then EFI_UNSUPPORTED must be returned.\r
+\r
+  If the timeout specified by TimeoutInMicroseconds expires before the AP returns\r
+  from Procedure, then execution of Procedure by the AP is terminated. The AP is\r
+  available for subsequent calls to EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() and\r
+  EFI_MP_SERVICES_PROTOCOL.StartupThisAP().\r
+\r
+  @param[in]  This                    A pointer to the EFI_MP_SERVICES_PROTOCOL\r
+                                      instance.\r
+  @param[in]  Procedure               A pointer to the function to be run on\r
+                                      enabled APs of the system. See type\r
+                                      EFI_AP_PROCEDURE.\r
+  @param[in]  ProcessorNumber         The handle number of the AP. The range is\r
+                                      from 0 to the total number of logical\r
+                                      processors minus 1. The total number of\r
+                                      logical processors can be retrieved by\r
+                                      EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors().\r
+  @param[in]  WaitEvent               The event created by the caller with CreateEvent()\r
+                                      service.  If it is NULL, then execute in\r
+                                      blocking mode. BSP waits until all APs finish\r
+                                      or TimeoutInMicroseconds expires.  If it's\r
+                                      not NULL, then execute in non-blocking mode.\r
+                                      BSP requests the function specified by\r
+                                      Procedure to be started on all the enabled\r
+                                      APs, and go on executing immediately. If\r
+                                      all return from Procedure or TimeoutInMicroseconds\r
+                                      expires, this event is signaled. The BSP\r
+                                      can use the CheckEvent() or WaitForEvent()\r
+                                      services to check the state of event.  Type\r
+                                      EFI_EVENT is defined in CreateEvent() in\r
+                                      the Unified Extensible Firmware Interface\r
+                                      Specification.\r
+  @param[in]  TimeoutInMicroseconds   Indicates the time limit in microseconds for\r
+                                      APs to return from Procedure, either for\r
+                                      blocking or non-blocking mode. Zero means\r
+                                      infinity.  If the timeout expires before\r
+                                      all APs return from Procedure, then Procedure\r
+                                      on the failed APs is terminated. All enabled\r
+                                      APs are available for next function assigned\r
+                                      by EFI_MP_SERVICES_PROTOCOL.StartupAllAPs()\r
+                                      or EFI_MP_SERVICES_PROTOCOL.StartupThisAP().\r
+                                      If the timeout expires in blocking mode,\r
+                                      BSP returns EFI_TIMEOUT.  If the timeout\r
+                                      expires in non-blocking mode, WaitEvent\r
+                                      is signaled with SignalEvent().\r
+  @param[in]  ProcedureArgument       The parameter passed into Procedure for\r
+                                      all APs.\r
+  @param[out] Finished                If NULL, this parameter is ignored.  In\r
+                                      blocking mode, this parameter is ignored.\r
+                                      In non-blocking mode, if AP returns from\r
+                                      Procedure before the timeout expires, its\r
+                                      content is set to TRUE. Otherwise, the\r
+                                      value is set to FALSE. The caller can\r
+                                      determine if the AP returned from Procedure\r
+                                      by evaluating this value.\r
+\r
+  @retval EFI_SUCCESS             In blocking mode, specified AP finished before\r
+                                  the timeout expires.\r
+  @retval EFI_SUCCESS             In non-blocking mode, the function has been\r
+                                  dispatched to specified AP.\r
+  @retval EFI_UNSUPPORTED         A non-blocking mode request was made after the\r
+                                  UEFI event EFI_EVENT_GROUP_READY_TO_BOOT was\r
+                                  signaled.\r
+  @retval EFI_DEVICE_ERROR        The calling processor is an AP.\r
+  @retval EFI_TIMEOUT             In blocking mode, the timeout expired before\r
+                                  the specified AP has finished.\r
+  @retval EFI_NOT_READY           The specified AP is busy.\r
+  @retval EFI_NOT_FOUND           The processor with the handle specified by\r
+                                  ProcessorNumber does not exist.\r
+  @retval EFI_INVALID_PARAMETER   ProcessorNumber specifies the BSP or disabled AP.\r
+  @retval EFI_INVALID_PARAMETER   Procedure is NULL.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+StartupThisAP (\r
+  IN  EFI_MP_SERVICES_PROTOCOL  *This,\r
+  IN  EFI_AP_PROCEDURE          Procedure,\r
+  IN  UINTN                     ProcessorNumber,\r
+  IN  EFI_EVENT                 WaitEvent               OPTIONAL,\r
+  IN  UINTN                     TimeoutInMicroseconds,\r
+  IN  VOID                      *ProcedureArgument      OPTIONAL,\r
+  OUT BOOLEAN                   *Finished               OPTIONAL\r
+  );\r
+\r
 /**\r
   This service lets the caller enable or disable an AP from this point onward.\r
   This service may only be called from the BSP.\r
@@ -283,5 +386,19 @@ WhoAmI (
   OUT UINTN                    *ProcessorNumber\r
   );\r
 \r
+/**\r
+  Terminate AP's task and set it to idle state.\r
+\r
+  This function terminates AP's task due to timeout by sending INIT-SIPI,\r
+  and sends it to idle state.\r
+\r
+  @param CpuData           the pointer to CPU_DATA_BLOCK of specified AP\r
+\r
+**/\r
+VOID\r
+ResetProcessorToIdleState (\r
+  IN CPU_DATA_BLOCK  *CpuData\r
+  );\r
+\r
 #endif // _CPU_MP_H_\r
 \r