]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/X86TimerLib.c
UefiCpuPkg: Apply uncrustify changes
[mirror_edk2.git] / UefiCpuPkg / Library / SecPeiDxeTimerLibUefiCpu / X86TimerLib.c
index 8e2a420f80d0380b322976cc6a3c2bc40c5d13e0..e0149df0449ff4f2637135f94d59b644a2c99c83 100644 (file)
@@ -27,10 +27,10 @@ InternalX86GetTimerFrequency (
   VOID\r
   )\r
 {\r
-  UINTN Divisor;\r
+  UINTN  Divisor;\r
 \r
   GetApicTimerState (&Divisor, NULL, NULL);\r
-  return PcdGet32(PcdFSBClock) / (UINT32)Divisor;\r
+  return PcdGet32 (PcdFSBClock) / (UINT32)Divisor;\r
 }\r
 \r
 /**\r
@@ -48,13 +48,13 @@ InternalX86GetTimerFrequency (
 VOID\r
 EFIAPI\r
 InternalX86Delay (\r
-  IN      UINT32                    Delay\r
+  IN      UINT32  Delay\r
   )\r
 {\r
-  INT32                             Ticks;\r
-  UINT32                            Times;\r
-  UINT32                            InitCount;\r
-  UINT32                            StartTick;\r
+  INT32   Ticks;\r
+  UINT32  Times;\r
+  UINT32  InitCount;\r
+  UINT32  StartTick;\r
 \r
   //\r
   // In case Delay is too larger, separate it into several small delay slot.\r
@@ -65,13 +65,13 @@ InternalX86Delay (
   //\r
   InitCount = GetApicTimerInitCount ();\r
   ASSERT (InitCount != 0);\r
-  Times     = Delay / (InitCount / 2);\r
-  Delay     = Delay % (InitCount / 2);\r
+  Times = Delay / (InitCount / 2);\r
+  Delay = Delay % (InitCount / 2);\r
 \r
   //\r
   // Get Start Tick and do delay\r
   //\r
-  StartTick  = GetApicTimerCurrentCount ();\r
+  StartTick = GetApicTimerCurrentCount ();\r
   do {\r
     //\r
     // Wait until time out by Delay value\r
@@ -111,7 +111,7 @@ InternalX86Delay (
 UINTN\r
 EFIAPI\r
 MicroSecondDelay (\r
-  IN      UINTN                     MicroSeconds\r
+  IN      UINTN  MicroSeconds\r
   )\r
 {\r
   InternalX86Delay (\r
@@ -139,7 +139,7 @@ MicroSecondDelay (
 UINTN\r
 EFIAPI\r
 NanoSecondDelay (\r
-  IN      UINTN                     NanoSeconds\r
+  IN      UINTN  NanoSeconds\r
   )\r
 {\r
   InternalX86Delay (\r
@@ -200,8 +200,8 @@ GetPerformanceCounter (
 UINT64\r
 EFIAPI\r
 GetPerformanceCounterProperties (\r
-  OUT      UINT64                    *StartValue   OPTIONAL,\r
-  OUT      UINT64                    *EndValue     OPTIONAL\r
+  OUT      UINT64  *StartValue   OPTIONAL,\r
+  OUT      UINT64  *EndValue     OPTIONAL\r
   )\r
 {\r
   if (StartValue != NULL) {\r
@@ -212,7 +212,7 @@ GetPerformanceCounterProperties (
     *EndValue = 0;\r
   }\r
 \r
-  return (UINT64) InternalX86GetTimerFrequency ();\r
+  return (UINT64)InternalX86GetTimerFrequency ();\r
 }\r
 \r
 /**\r
@@ -229,7 +229,7 @@ GetPerformanceCounterProperties (
 UINT64\r
 EFIAPI\r
 GetTimeInNanoSecond (\r
-  IN      UINT64                     Ticks\r
+  IN      UINT64  Ticks\r
   )\r
 {\r
   UINT64  Frequency;\r
@@ -251,9 +251,9 @@ GetTimeInNanoSecond (
   // Since 2^29 < 1,000,000,000 = 0x3B9ACA00 < 2^30, Remainder should < 2^(64-30) = 2^34,\r
   // i.e. highest bit set in Remainder should <= 33.\r
   //\r
-  Shift = MAX (0, HighBitSet64 (Remainder) - 33);\r
-  Remainder = RShiftU64 (Remainder, (UINTN) Shift);\r
-  Frequency = RShiftU64 (Frequency, (UINTN) Shift);\r
+  Shift        = MAX (0, HighBitSet64 (Remainder) - 33);\r
+  Remainder    = RShiftU64 (Remainder, (UINTN)Shift);\r
+  Frequency    = RShiftU64 (Frequency, (UINTN)Shift);\r
   NanoSeconds += DivU64x64Remainder (MultU64x32 (Remainder, 1000000000u), Frequency, NULL);\r
 \r
   return NanoSeconds;\r