Revision: 16690
          http://sourceforge.net/p/edk2/code/16690
Author:   lersek
Date:     2015-02-02 12:01:38 +0000 (Mon, 02 Feb 2015)
Log Message:
-----------
ArmPkg: ArmArchTimerLib: use edk2-conformant (UINT64 * UINT32) / UINT32

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Olivier Martin <[email protected]>

Modified Paths:
--------------
    trunk/edk2/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c

Modified: trunk/edk2/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c
===================================================================
--- trunk/edk2/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c 2015-02-02 
12:01:29 UTC (rev 16689)
+++ trunk/edk2/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c 2015-02-02 
12:01:38 UTC (rev 16690)
@@ -96,7 +96,13 @@
   // 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 ();


------------------------------------------------------------------------------
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-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to