summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:54:17 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commit053e878bfb5c9d5eca779789b62891add30b14ba (patch)
tree1cdf5bacb37306e373b8d14bd67c5b3e4f3b269f /UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu
parent91415a36ae7aaeabb2bbab3762f39544f9aed683 (diff)
downloadedk2-053e878bfb5c9d5eca779789b62891add30b14ba.tar.gz
edk2-053e878bfb5c9d5eca779789b62891add30b14ba.tar.bz2
edk2-053e878bfb5c9d5eca779789b62891add30b14ba.zip
UefiCpuPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the UefiCpuPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu')
-rw-r--r--UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/X86TimerLib.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/X86TimerLib.c b/UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/X86TimerLib.c
index 8e2a420f80..e0149df044 100644
--- a/UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/X86TimerLib.c
+++ b/UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/X86TimerLib.c
@@ -27,10 +27,10 @@ InternalX86GetTimerFrequency (
VOID
)
{
- UINTN Divisor;
+ UINTN Divisor;
GetApicTimerState (&Divisor, NULL, NULL);
- return PcdGet32(PcdFSBClock) / (UINT32)Divisor;
+ return PcdGet32 (PcdFSBClock) / (UINT32)Divisor;
}
/**
@@ -48,13 +48,13 @@ InternalX86GetTimerFrequency (
VOID
EFIAPI
InternalX86Delay (
- IN UINT32 Delay
+ IN UINT32 Delay
)
{
- INT32 Ticks;
- UINT32 Times;
- UINT32 InitCount;
- UINT32 StartTick;
+ INT32 Ticks;
+ UINT32 Times;
+ UINT32 InitCount;
+ UINT32 StartTick;
//
// In case Delay is too larger, separate it into several small delay slot.
@@ -65,13 +65,13 @@ InternalX86Delay (
//
InitCount = GetApicTimerInitCount ();
ASSERT (InitCount != 0);
- Times = Delay / (InitCount / 2);
- Delay = Delay % (InitCount / 2);
+ Times = Delay / (InitCount / 2);
+ Delay = Delay % (InitCount / 2);
//
// Get Start Tick and do delay
//
- StartTick = GetApicTimerCurrentCount ();
+ StartTick = GetApicTimerCurrentCount ();
do {
//
// Wait until time out by Delay value
@@ -111,7 +111,7 @@ InternalX86Delay (
UINTN
EFIAPI
MicroSecondDelay (
- IN UINTN MicroSeconds
+ IN UINTN MicroSeconds
)
{
InternalX86Delay (
@@ -139,7 +139,7 @@ MicroSecondDelay (
UINTN
EFIAPI
NanoSecondDelay (
- IN UINTN NanoSeconds
+ IN UINTN NanoSeconds
)
{
InternalX86Delay (
@@ -200,8 +200,8 @@ GetPerformanceCounter (
UINT64
EFIAPI
GetPerformanceCounterProperties (
- OUT UINT64 *StartValue OPTIONAL,
- OUT UINT64 *EndValue OPTIONAL
+ OUT UINT64 *StartValue OPTIONAL,
+ OUT UINT64 *EndValue OPTIONAL
)
{
if (StartValue != NULL) {
@@ -212,7 +212,7 @@ GetPerformanceCounterProperties (
*EndValue = 0;
}
- return (UINT64) InternalX86GetTimerFrequency ();
+ return (UINT64)InternalX86GetTimerFrequency ();
}
/**
@@ -229,7 +229,7 @@ GetPerformanceCounterProperties (
UINT64
EFIAPI
GetTimeInNanoSecond (
- IN UINT64 Ticks
+ IN UINT64 Ticks
)
{
UINT64 Frequency;
@@ -251,9 +251,9 @@ GetTimeInNanoSecond (
// Since 2^29 < 1,000,000,000 = 0x3B9ACA00 < 2^30, Remainder should < 2^(64-30) = 2^34,
// i.e. highest bit set in Remainder should <= 33.
//
- Shift = MAX (0, HighBitSet64 (Remainder) - 33);
- Remainder = RShiftU64 (Remainder, (UINTN) Shift);
- Frequency = RShiftU64 (Frequency, (UINTN) Shift);
+ Shift = MAX (0, HighBitSet64 (Remainder) - 33);
+ Remainder = RShiftU64 (Remainder, (UINTN)Shift);
+ Frequency = RShiftU64 (Frequency, (UINTN)Shift);
NanoSeconds += DivU64x64Remainder (MultU64x32 (Remainder, 1000000000u), Frequency, NULL);
return NanoSeconds;