Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <[email protected]> --- ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c index 384a31a..bcddf1e 100644 --- a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c +++ b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c @@ -93,13 +93,19 @@ MicroSecondDelay ( UINT64 TimerTicks64; UINT64 SystemCounterVal; // Calculate counter ticks that can represent requested delay: // = MicroSeconds x TICKS_PER_MICRO_SEC // = MicroSeconds x Frequency.10^-6 - TimerTicks64 = ((UINT64)MicroSeconds * PcdGet32 (PcdArmArchTimerFreqInHz)) / 1000000U; + TimerTicks64 = DivU64x32 ( + MultU64x32 ( + MicroSeconds, + PcdGet32 (PcdArmArchTimerFreqInHz) + ), + 1000000U + ); // Read System Counter value SystemCounterVal = ArmGenericTimerGetSystemCount (); TimerTicks64 += SystemCounterVal; -- 1.8.3.1 ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
