diff options
-rw-r--r-- | UefiCpuPkg/CpuTimerDxeRiscV64/Timer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/UefiCpuPkg/CpuTimerDxeRiscV64/Timer.c b/UefiCpuPkg/CpuTimerDxeRiscV64/Timer.c index 358057e7c6..30e48061cd 100644 --- a/UefiCpuPkg/CpuTimerDxeRiscV64/Timer.c +++ b/UefiCpuPkg/CpuTimerDxeRiscV64/Timer.c @@ -9,6 +9,7 @@ #include <Library/BaseLib.h>
#include <Library/BaseRiscVSbiLib.h>
+#include <Library/UefiLib.h>
#include "Timer.h"
//
@@ -71,7 +72,12 @@ TimerInterruptHandler ( // time to increment slower. So when we take an interrupt,
// account for the actual time passed.
//
- mTimerNotifyFunction (PeriodStart - mLastPeriodStart);
+ mTimerNotifyFunction (
+ DivU64x32 (
+ EFI_TIMER_PERIOD_SECONDS (PeriodStart - mLastPeriodStart),
+ PcdGet64 (PcdCpuCoreCrystalClockFrequency)
+ )
+ );
}
if (mTimerPeriod == 0) {
|