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
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
//\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
UINTN\r
EFIAPI\r
MicroSecondDelay (\r
- IN UINTN MicroSeconds\r
+ IN UINTN MicroSeconds\r
)\r
{\r
InternalX86Delay (\r
UINTN\r
EFIAPI\r
NanoSecondDelay (\r
- IN UINTN NanoSeconds\r
+ IN UINTN NanoSeconds\r
)\r
{\r
InternalX86Delay (\r
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
*EndValue = 0;\r
}\r
\r
- return (UINT64) InternalX86GetTimerFrequency ();\r
+ return (UINT64)InternalX86GetTimerFrequency ();\r
}\r
\r
/**\r
UINT64\r
EFIAPI\r
GetTimeInNanoSecond (\r
- IN UINT64 Ticks\r
+ IN UINT64 Ticks\r
)\r
{\r
UINT64 Frequency;\r
// 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