]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
UefiCpuPkg: Apply uncrustify changes
[mirror_edk2.git] / UefiCpuPkg / Library / MpInitLib / DxeMpLib.c
index 93fc63bf93e3070d5e3ddffae14158d72aacc74c..9d9206d20915bc9d3d3a15b412d210cb142f24c1 100644 (file)
 \r
 #include <Protocol/Timer.h>\r
 \r
-#define  AP_SAFE_STACK_SIZE    128\r
+#define  AP_SAFE_STACK_SIZE  128\r
 \r
-CPU_MP_DATA      *mCpuMpData = NULL;\r
-EFI_EVENT        mCheckAllApsEvent = NULL;\r
-EFI_EVENT        mMpInitExitBootServicesEvent = NULL;\r
-EFI_EVENT        mLegacyBootEvent = NULL;\r
-volatile BOOLEAN mStopCheckAllApsStatus = TRUE;\r
-VOID             *mReservedApLoopFunc = NULL;\r
-UINTN            mReservedTopOfApStack;\r
-volatile UINT32  mNumberToFinish = 0;\r
+CPU_MP_DATA       *mCpuMpData                  = NULL;\r
+EFI_EVENT         mCheckAllApsEvent            = NULL;\r
+EFI_EVENT         mMpInitExitBootServicesEvent = NULL;\r
+EFI_EVENT         mLegacyBootEvent             = NULL;\r
+volatile BOOLEAN  mStopCheckAllApsStatus       = TRUE;\r
+VOID              *mReservedApLoopFunc         = NULL;\r
+UINTN             mReservedTopOfApStack;\r
+volatile UINT32   mNumberToFinish = 0;\r
 \r
 //\r
 // Begin wakeup buffer allocation below 0x88000\r
 //\r
-STATIC EFI_PHYSICAL_ADDRESS mSevEsDxeWakeupBuffer = 0x88000;\r
+STATIC EFI_PHYSICAL_ADDRESS  mSevEsDxeWakeupBuffer = 0x88000;\r
 \r
 /**\r
   Enable Debug Agent to support source debugging on AP function.\r
@@ -70,7 +70,7 @@ GetCpuMpData (
 **/\r
 VOID\r
 SaveCpuMpData (\r
-  IN CPU_MP_DATA   *CpuMpData\r
+  IN CPU_MP_DATA  *CpuMpData\r
   )\r
 {\r
   mCpuMpData = CpuMpData;\r
@@ -86,12 +86,12 @@ SaveCpuMpData (
 **/\r
 UINTN\r
 GetWakeupBuffer (\r
-  IN UINTN                WakeupBufferSize\r
+  IN UINTN  WakeupBufferSize\r
   )\r
 {\r
-  EFI_STATUS              Status;\r
-  EFI_PHYSICAL_ADDRESS    StartAddress;\r
-  EFI_MEMORY_TYPE         MemoryType;\r
+  EFI_STATUS            Status;\r
+  EFI_PHYSICAL_ADDRESS  StartAddress;\r
+  EFI_MEMORY_TYPE       MemoryType;\r
 \r
   if (PcdGetBool (PcdSevEsIsEnabled)) {\r
     MemoryType = EfiReservedMemoryType;\r
@@ -115,6 +115,7 @@ GetWakeupBuffer (
   } else {\r
     StartAddress = 0x88000;\r
   }\r
+\r
   Status = gBS->AllocatePages (\r
                   AllocateMaxAddress,\r
                   MemoryType,\r
@@ -123,7 +124,7 @@ GetWakeupBuffer (
                   );\r
   ASSERT_EFI_ERROR (Status);\r
   if (EFI_ERROR (Status)) {\r
-    StartAddress = (EFI_PHYSICAL_ADDRESS) -1;\r
+    StartAddress = (EFI_PHYSICAL_ADDRESS)-1;\r
   } else if (PcdGetBool (PcdSevEsIsEnabled)) {\r
     //\r
     // Next SEV-ES wakeup buffer allocation must be below this allocation\r
@@ -131,10 +132,14 @@ GetWakeupBuffer (
     mSevEsDxeWakeupBuffer = StartAddress;\r
   }\r
 \r
-  DEBUG ((DEBUG_INFO, "WakeupBufferStart = %x, WakeupBufferSize = %x\n",\r
-                      (UINTN) StartAddress, WakeupBufferSize));\r
+  DEBUG ((\r
+    DEBUG_INFO,\r
+    "WakeupBufferStart = %x, WakeupBufferSize = %x\n",\r
+    (UINTN)StartAddress,\r
+    WakeupBufferSize\r
+    ));\r
 \r
-  return (UINTN) StartAddress;\r
+  return (UINTN)StartAddress;\r
 }\r
 \r
 /**\r
@@ -151,19 +156,19 @@ GetWakeupBuffer (
 **/\r
 UINTN\r
 GetModeTransitionBuffer (\r
-  IN UINTN                BufferSize\r
+  IN UINTN  BufferSize\r
   )\r
 {\r
-  EFI_STATUS              Status;\r
-  EFI_PHYSICAL_ADDRESS    StartAddress;\r
+  EFI_STATUS            Status;\r
+  EFI_PHYSICAL_ADDRESS  StartAddress;\r
 \r
   StartAddress = BASE_4GB - 1;\r
-  Status = gBS->AllocatePages (\r
-                  AllocateMaxAddress,\r
-                  EfiBootServicesCode,\r
-                  EFI_SIZE_TO_PAGES (BufferSize),\r
-                  &StartAddress\r
-                  );\r
+  Status       = gBS->AllocatePages (\r
+                        AllocateMaxAddress,\r
+                        EfiBootServicesCode,\r
+                        EFI_SIZE_TO_PAGES (BufferSize),\r
+                        &StartAddress\r
+                        );\r
   if (EFI_ERROR (Status)) {\r
     StartAddress = 0;\r
   }\r
@@ -194,27 +199,27 @@ GetSevEsAPMemory (
   // Allocate 1 page for AP jump table page\r
   //\r
   StartAddress = BASE_4GB - 1;\r
-  Status = gBS->AllocatePages (\r
-                  AllocateMaxAddress,\r
-                  EfiReservedMemoryType,\r
-                  1,\r
-                  &StartAddress\r
-                  );\r
+  Status       = gBS->AllocatePages (\r
+                        AllocateMaxAddress,\r
+                        EfiReservedMemoryType,\r
+                        1,\r
+                        &StartAddress\r
+                        );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  DEBUG ((DEBUG_INFO, "Dxe: SevEsAPMemory = %lx\n", (UINTN) StartAddress));\r
+  DEBUG ((DEBUG_INFO, "Dxe: SevEsAPMemory = %lx\n", (UINTN)StartAddress));\r
 \r
   //\r
   // Save the SevEsAPMemory as the AP jump table.\r
   //\r
   Msr.GhcbPhysicalAddress = AsmReadMsr64 (MSR_SEV_ES_GHCB);\r
-  Ghcb = Msr.Ghcb;\r
+  Ghcb                    = Msr.Ghcb;\r
 \r
   VmgInit (Ghcb, &InterruptState);\r
-  VmgExit (Ghcb, SVM_EXIT_AP_JUMP_TABLE, 0, (UINT64) (UINTN) StartAddress);\r
+  VmgExit (Ghcb, SVM_EXIT_AP_JUMP_TABLE, 0, (UINT64)(UINTN)StartAddress);\r
   VmgDone (Ghcb, InterruptState);\r
 \r
-  return (UINTN) StartAddress;\r
+  return (UINTN)StartAddress;\r
 }\r
 \r
 /**\r
@@ -226,9 +231,9 @@ CheckAndUpdateApsStatus (
   VOID\r
   )\r
 {\r
-  UINTN                   ProcessorNumber;\r
-  EFI_STATUS              Status;\r
-  CPU_MP_DATA             *CpuMpData;\r
+  UINTN        ProcessorNumber;\r
+  EFI_STATUS   Status;\r
+  CPU_MP_DATA  *CpuMpData;\r
 \r
   CpuMpData = GetCpuMpData ();\r
 \r
@@ -236,13 +241,12 @@ CheckAndUpdateApsStatus (
   // First, check whether pending StartupAllAPs() exists.\r
   //\r
   if (CpuMpData->WaitEvent != NULL) {\r
-\r
     Status = CheckAllAPs ();\r
     //\r
     // If all APs finish for StartupAllAPs(), signal the WaitEvent for it.\r
     //\r
     if (Status != EFI_NOT_READY) {\r
-      Status = gBS->SignalEvent (CpuMpData->WaitEvent);\r
+      Status               = gBS->SignalEvent (CpuMpData->WaitEvent);\r
       CpuMpData->WaitEvent = NULL;\r
     }\r
   }\r
@@ -251,7 +255,6 @@ CheckAndUpdateApsStatus (
   // Second, check whether pending StartupThisAPs() callings exist.\r
   //\r
   for (ProcessorNumber = 0; ProcessorNumber < CpuMpData->CpuCount; ProcessorNumber++) {\r
-\r
     if (CpuMpData->CpuData[ProcessorNumber].WaitEvent == NULL) {\r
       continue;\r
     }\r
@@ -260,7 +263,7 @@ CheckAndUpdateApsStatus (
 \r
     if (Status != EFI_NOT_READY) {\r
       gBS->SignalEvent (CpuMpData->CpuData[ProcessorNumber].WaitEvent);\r
-     CpuMpData->CpuData[ProcessorNumber].WaitEvent = NULL;\r
+      CpuMpData->CpuData[ProcessorNumber].WaitEvent = NULL;\r
     }\r
   }\r
 }\r
@@ -279,8 +282,8 @@ CheckAndUpdateApsStatus (
 VOID\r
 EFIAPI\r
 CheckApsStatus (\r
-  IN  EFI_EVENT                           Event,\r
-  IN  VOID                                *Context\r
+  IN  EFI_EVENT  Event,\r
+  IN  VOID       *Context\r
   )\r
 {\r
   //\r
@@ -307,18 +310,20 @@ GetProtectedMode16CS (
   UINTN                    GdtEntryCount;\r
   UINT16                   Index;\r
 \r
-  Index = (UINT16) -1;\r
+  Index = (UINT16)-1;\r
   AsmReadGdtr (&GdtrDesc);\r
   GdtEntryCount = (GdtrDesc.Limit + 1) / sizeof (IA32_SEGMENT_DESCRIPTOR);\r
-  GdtEntry = (IA32_SEGMENT_DESCRIPTOR *) GdtrDesc.Base;\r
+  GdtEntry      = (IA32_SEGMENT_DESCRIPTOR *)GdtrDesc.Base;\r
   for (Index = 0; Index < GdtEntryCount; Index++) {\r
     if (GdtEntry->Bits.L == 0) {\r
-      if (GdtEntry->Bits.Type > 8 && GdtEntry->Bits.DB == 0) {\r
+      if ((GdtEntry->Bits.Type > 8) && (GdtEntry->Bits.DB == 0)) {\r
         break;\r
       }\r
     }\r
+\r
     GdtEntry++;\r
   }\r
+\r
   ASSERT (Index != GdtEntryCount);\r
   return Index * 8;\r
 }\r
@@ -340,15 +345,17 @@ GetProtectedModeCS (
 \r
   AsmReadGdtr (&GdtrDesc);\r
   GdtEntryCount = (GdtrDesc.Limit + 1) / sizeof (IA32_SEGMENT_DESCRIPTOR);\r
-  GdtEntry = (IA32_SEGMENT_DESCRIPTOR *) GdtrDesc.Base;\r
+  GdtEntry      = (IA32_SEGMENT_DESCRIPTOR *)GdtrDesc.Base;\r
   for (Index = 0; Index < GdtEntryCount; Index++) {\r
     if (GdtEntry->Bits.L == 0) {\r
-      if (GdtEntry->Bits.Type > 8 && GdtEntry->Bits.DB == 1) {\r
+      if ((GdtEntry->Bits.Type > 8) && (GdtEntry->Bits.DB == 1)) {\r
         break;\r
       }\r
     }\r
+\r
     GdtEntry++;\r
   }\r
+\r
   ASSERT (Index != GdtEntryCount);\r
   return Index * 8;\r
 }\r
@@ -364,11 +371,11 @@ RelocateApLoop (
   IN OUT VOID  *Buffer\r
   )\r
 {\r
-  CPU_MP_DATA            *CpuMpData;\r
-  BOOLEAN                MwaitSupport;\r
-  ASM_RELOCATE_AP_LOOP   AsmRelocateApLoopFunc;\r
-  UINTN                  ProcessorNumber;\r
-  UINTN                  StackStart;\r
+  CPU_MP_DATA           *CpuMpData;\r
+  BOOLEAN               MwaitSupport;\r
+  ASM_RELOCATE_AP_LOOP  AsmRelocateApLoopFunc;\r
+  UINTN                 ProcessorNumber;\r
+  UINTN                 StackStart;\r
 \r
   MpInitLibWhoAmI (&ProcessorNumber);\r
   CpuMpData    = GetCpuMpData ();\r
@@ -378,13 +385,14 @@ RelocateApLoop (
   } else {\r
     StackStart = mReservedTopOfApStack;\r
   }\r
-  AsmRelocateApLoopFunc = (ASM_RELOCATE_AP_LOOP) (UINTN) mReservedApLoopFunc;\r
+\r
+  AsmRelocateApLoopFunc = (ASM_RELOCATE_AP_LOOP)(UINTN)mReservedApLoopFunc;\r
   AsmRelocateApLoopFunc (\r
     MwaitSupport,\r
     CpuMpData->ApTargetCState,\r
     CpuMpData->PmCodeSegment,\r
     StackStart - ProcessorNumber * AP_SAFE_STACK_SIZE,\r
-    (UINTN) &mNumberToFinish,\r
+    (UINTN)&mNumberToFinish,\r
     CpuMpData->Pm16CodeSegment,\r
     CpuMpData->SevEsAPBuffer,\r
     CpuMpData->WakeupBuffer\r
@@ -406,32 +414,32 @@ RelocateApLoop (
 VOID\r
 EFIAPI\r
 MpInitChangeApLoopCallback (\r
-  IN EFI_EVENT                Event,\r
-  IN VOID                     *Context\r
+  IN EFI_EVENT  Event,\r
+  IN VOID       *Context\r
   )\r
 {\r
-  CPU_MP_DATA               *CpuMpData;\r
+  CPU_MP_DATA  *CpuMpData;\r
 \r
-  CpuMpData = GetCpuMpData ();\r
-  CpuMpData->PmCodeSegment = GetProtectedModeCS ();\r
+  CpuMpData                  = GetCpuMpData ();\r
+  CpuMpData->PmCodeSegment   = GetProtectedModeCS ();\r
   CpuMpData->Pm16CodeSegment = GetProtectedMode16CS ();\r
-  CpuMpData->ApLoopMode = PcdGet8 (PcdCpuApLoopMode);\r
-  mNumberToFinish = CpuMpData->CpuCount - 1;\r
+  CpuMpData->ApLoopMode      = PcdGet8 (PcdCpuApLoopMode);\r
+  mNumberToFinish            = CpuMpData->CpuCount - 1;\r
   WakeUpAP (CpuMpData, TRUE, 0, RelocateApLoop, NULL, TRUE);\r
   while (mNumberToFinish > 0) {\r
     CpuPause ();\r
   }\r
 \r
-  if (CpuMpData->SevEsIsEnabled && (CpuMpData->WakeupBuffer != (UINTN) -1)) {\r
+  if (CpuMpData->SevEsIsEnabled && (CpuMpData->WakeupBuffer != (UINTN)-1)) {\r
     //\r
     // There are APs present. Re-use reserved memory area below 1MB from\r
     // WakeupBuffer as the area to be used for transitioning to 16-bit mode\r
     // in support of booting of the AP by an OS.\r
     //\r
     CopyMem (\r
-      (VOID *) CpuMpData->WakeupBuffer,\r
-      (VOID *) (CpuMpData->AddressMap.RendezvousFunnelAddress +\r
-                  CpuMpData->AddressMap.SwitchToRealPM16ModeOffset),\r
+      (VOID *)CpuMpData->WakeupBuffer,\r
+      (VOID *)(CpuMpData->AddressMap.RendezvousFunnelAddress +\r
+               CpuMpData->AddressMap.SwitchToRealPM16ModeOffset),\r
       CpuMpData->AddressMap.SwitchToRealPM16ModeSize\r
       );\r
   }\r
@@ -446,16 +454,16 @@ MpInitChangeApLoopCallback (
 **/\r
 VOID\r
 InitMpGlobalData (\r
-  IN CPU_MP_DATA               *CpuMpData\r
+  IN CPU_MP_DATA  *CpuMpData\r
   )\r
 {\r
-  EFI_STATUS                          Status;\r
-  EFI_PHYSICAL_ADDRESS                Address;\r
-  UINTN                               ApSafeBufferSize;\r
-  UINTN                               Index;\r
-  EFI_GCD_MEMORY_SPACE_DESCRIPTOR     MemDesc;\r
-  UINTN                               StackBase;\r
-  CPU_INFO_IN_HOB                     *CpuInfoInHob;\r
+  EFI_STATUS                       Status;\r
+  EFI_PHYSICAL_ADDRESS             Address;\r
+  UINTN                            ApSafeBufferSize;\r
+  UINTN                            Index;\r
+  EFI_GCD_MEMORY_SPACE_DESCRIPTOR  MemDesc;\r
+  UINTN                            StackBase;\r
+  CPU_INFO_IN_HOB                  *CpuInfoInHob;\r
 \r
   SaveCpuMpData (CpuMpData);\r
 \r
@@ -485,7 +493,7 @@ InitMpGlobalData (
     //\r
     CpuInfoInHob = (CPU_INFO_IN_HOB *)(UINTN)CpuMpData->CpuInfoInHob;\r
     for (Index = 0; Index < CpuMpData->CpuCount; ++Index) {\r
-      if (CpuInfoInHob != NULL && CpuInfoInHob[Index].ApTopOfStack != 0) {\r
+      if ((CpuInfoInHob != NULL) && (CpuInfoInHob[Index].ApTopOfStack != 0)) {\r
         StackBase = (UINTN)CpuInfoInHob[Index].ApTopOfStack - CpuMpData->CpuApStackSize;\r
       } else {\r
         StackBase = CpuMpData->Buffer + Index * CpuMpData->CpuApStackSize;\r
@@ -501,8 +509,12 @@ InitMpGlobalData (
                       );\r
       ASSERT_EFI_ERROR (Status);\r
 \r
-      DEBUG ((DEBUG_INFO, "Stack Guard set at %lx [cpu%lu]!\n",\r
-              (UINT64)StackBase, (UINT64)Index));\r
+      DEBUG ((\r
+        DEBUG_INFO,\r
+        "Stack Guard set at %lx [cpu%lu]!\n",\r
+        (UINT64)StackBase,\r
+        (UINT64)Index\r
+        ));\r
     }\r
   }\r
 \r
@@ -514,9 +526,11 @@ InitMpGlobalData (
   // Allocating it in advance since memory services are not available in\r
   // Exit Boot Services callback function.\r
   //\r
-  ApSafeBufferSize  = EFI_PAGES_TO_SIZE (EFI_SIZE_TO_PAGES (\r
-                        CpuMpData->AddressMap.RelocateApLoopFuncSize\r
-                        ));\r
+  ApSafeBufferSize = EFI_PAGES_TO_SIZE (\r
+                       EFI_SIZE_TO_PAGES (\r
+                         CpuMpData->AddressMap.RelocateApLoopFuncSize\r
+                         )\r
+                       );\r
   Address = BASE_4GB - 1;\r
   Status  = gBS->AllocatePages (\r
                    AllocateMaxAddress,\r
@@ -526,7 +540,7 @@ InitMpGlobalData (
                    );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  mReservedApLoopFunc = (VOID *) (UINTN) Address;\r
+  mReservedApLoopFunc = (VOID *)(UINTN)Address;\r
   ASSERT (mReservedApLoopFunc != NULL);\r
 \r
   //\r
@@ -545,9 +559,11 @@ InitMpGlobalData (
            );\r
   }\r
 \r
-  ApSafeBufferSize = EFI_PAGES_TO_SIZE (EFI_SIZE_TO_PAGES (\r
-                       CpuMpData->CpuCount * AP_SAFE_STACK_SIZE\r
-                       ));\r
+  ApSafeBufferSize = EFI_PAGES_TO_SIZE (\r
+                       EFI_SIZE_TO_PAGES (\r
+                         CpuMpData->CpuCount * AP_SAFE_STACK_SIZE\r
+                         )\r
+                       );\r
   Address = BASE_4GB - 1;\r
   Status  = gBS->AllocatePages (\r
                    AllocateMaxAddress,\r
@@ -557,7 +573,7 @@ InitMpGlobalData (
                    );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  mReservedTopOfApStack = (UINTN) Address + ApSafeBufferSize;\r
+  mReservedTopOfApStack = (UINTN)Address + ApSafeBufferSize;\r
   ASSERT ((mReservedTopOfApStack & (UINTN)(CPU_STACK_ALIGNMENT - 1)) == 0);\r
   CopyMem (\r
     mReservedApLoopFunc,\r
@@ -684,15 +700,15 @@ InitMpGlobalData (
 EFI_STATUS\r
 EFIAPI\r
 MpInitLibStartupAllAPs (\r
-  IN  EFI_AP_PROCEDURE          Procedure,\r
-  IN  BOOLEAN                   SingleThread,\r
-  IN  EFI_EVENT                 WaitEvent               OPTIONAL,\r
-  IN  UINTN                     TimeoutInMicroseconds,\r
-  IN  VOID                      *ProcedureArgument      OPTIONAL,\r
-  OUT UINTN                     **FailedCpuList         OPTIONAL\r
+  IN  EFI_AP_PROCEDURE  Procedure,\r
+  IN  BOOLEAN           SingleThread,\r
+  IN  EFI_EVENT         WaitEvent               OPTIONAL,\r
+  IN  UINTN             TimeoutInMicroseconds,\r
+  IN  VOID              *ProcedureArgument      OPTIONAL,\r
+  OUT UINTN             **FailedCpuList         OPTIONAL\r
   )\r
 {\r
-  EFI_STATUS              Status;\r
+  EFI_STATUS  Status;\r
 \r
   //\r
   // Temporarily stop checkAllApsStatus for avoid resource dead-lock.\r
@@ -791,15 +807,15 @@ MpInitLibStartupAllAPs (
 EFI_STATUS\r
 EFIAPI\r
 MpInitLibStartupThisAP (\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
+  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
-  EFI_STATUS              Status;\r
+  EFI_STATUS  Status;\r
 \r
   //\r
   // temporarily stop checkAllApsStatus for avoid resource dead-lock.\r
@@ -849,19 +865,19 @@ MpInitLibStartupThisAP (
 EFI_STATUS\r
 EFIAPI\r
 MpInitLibSwitchBSP (\r
-  IN UINTN                     ProcessorNumber,\r
-  IN BOOLEAN                   EnableOldBSP\r
+  IN UINTN    ProcessorNumber,\r
+  IN BOOLEAN  EnableOldBSP\r
   )\r
 {\r
-  EFI_STATUS                   Status;\r
-  EFI_TIMER_ARCH_PROTOCOL      *Timer;\r
-  UINT64                       TimerPeriod;\r
+  EFI_STATUS               Status;\r
+  EFI_TIMER_ARCH_PROTOCOL  *Timer;\r
+  UINT64                   TimerPeriod;\r
 \r
   TimerPeriod = 0;\r
   //\r
   // Locate Timer Arch Protocol\r
   //\r
-  Status = gBS->LocateProtocol (&gEfiTimerArchProtocolGuid, NULL, (VOID **) &Timer);\r
+  Status = gBS->LocateProtocol (&gEfiTimerArchProtocolGuid, NULL, (VOID **)&Timer);\r
   if (EFI_ERROR (Status)) {\r
     Timer = NULL;\r
   }\r
@@ -922,13 +938,13 @@ MpInitLibSwitchBSP (
 EFI_STATUS\r
 EFIAPI\r
 MpInitLibEnableDisableAP (\r
-  IN  UINTN                     ProcessorNumber,\r
-  IN  BOOLEAN                   EnableAP,\r
-  IN  UINT32                    *HealthFlag OPTIONAL\r
+  IN  UINTN    ProcessorNumber,\r
+  IN  BOOLEAN  EnableAP,\r
+  IN  UINT32   *HealthFlag OPTIONAL\r
   )\r
 {\r
-  EFI_STATUS     Status;\r
-  BOOLEAN        TempStopCheckState;\r
+  EFI_STATUS  Status;\r
+  BOOLEAN     TempStopCheckState;\r
 \r
   TempStopCheckState = FALSE;\r
   //\r
@@ -961,7 +977,7 @@ MpInitLibEnableDisableAP (
 **/\r
 EFI_STATUS\r
 PlatformShadowMicrocode (\r
-  IN OUT CPU_MP_DATA             *CpuMpData\r
+  IN OUT CPU_MP_DATA  *CpuMpData\r
   )\r
 {\r
   //\r