summaryrefslogtreecommitdiff
path: root/ArmPkg/Library
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg/Library')
-rw-r--r--ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c
index d1cd0c8e6e..4fe7cb8d64 100644
--- a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c
+++ b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c
@@ -82,8 +82,10 @@ MicroSecondDelay (
UINT64 TimerTicks64;
UINT64 SystemCounterVal;
- // Calculate counter ticks that can represent requested delay
- TimerTicks64 = MultU64x32 (MicroSeconds, TICKS_PER_MICRO_SEC);
+ // Calculate counter ticks that can represent requested delay:
+ // = MicroSeconds x TICKS_PER_MICRO_SEC
+ // = MicroSeconds x Frequency.10^-6
+ TimerTicks64 = (MicroSeconds * PcdGet32 (PcdArmArchTimerFreqInHz)) / 1000000U;
// Read System Counter value
SystemCounterVal = ArmArchTimerGetSystemCount ();