mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
ArmPkg: ArmArchTimerLib: use edk2-conformant (UINT64 * UINT32) / UINT32
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Olivier Martin <Olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16690 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
074a67fc80
commit
b36bc5af58
@ -96,7 +96,13 @@ MicroSecondDelay (
|
|||||||
// Calculate counter ticks that can represent requested delay:
|
// Calculate counter ticks that can represent requested delay:
|
||||||
// = MicroSeconds x TICKS_PER_MICRO_SEC
|
// = MicroSeconds x TICKS_PER_MICRO_SEC
|
||||||
// = MicroSeconds x Frequency.10^-6
|
// = MicroSeconds x Frequency.10^-6
|
||||||
TimerTicks64 = ((UINT64)MicroSeconds * PcdGet32 (PcdArmArchTimerFreqInHz)) / 1000000U;
|
TimerTicks64 = DivU64x32 (
|
||||||
|
MultU64x32 (
|
||||||
|
MicroSeconds,
|
||||||
|
PcdGet32 (PcdArmArchTimerFreqInHz)
|
||||||
|
),
|
||||||
|
1000000U
|
||||||
|
);
|
||||||
|
|
||||||
// Read System Counter value
|
// Read System Counter value
|
||||||
SystemCounterVal = ArmGenericTimerGetSystemCount ();
|
SystemCounterVal = ArmGenericTimerGetSystemCount ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user