summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/CpuTimerDxeRiscV64/Timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'UefiCpuPkg/CpuTimerDxeRiscV64/Timer.c')
-rw-r--r--UefiCpuPkg/CpuTimerDxeRiscV64/Timer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/UefiCpuPkg/CpuTimerDxeRiscV64/Timer.c b/UefiCpuPkg/CpuTimerDxeRiscV64/Timer.c
index 216f48a..14780e4 100644
--- a/UefiCpuPkg/CpuTimerDxeRiscV64/Timer.c
+++ b/UefiCpuPkg/CpuTimerDxeRiscV64/Timer.c
@@ -10,6 +10,7 @@
#include <Library/BaseLib.h>
#include <Library/BaseRiscVSbiLib.h>
#include <Library/UefiLib.h>
+#include <Library/TimerLib.h>
#include "Timer.h"
//
@@ -114,7 +115,7 @@ TimerInterruptHandler (
mTimerNotifyFunction (
DivU64x32 (
EFI_TIMER_PERIOD_SECONDS (PeriodStart - mLastPeriodStart),
- PcdGet64 (PcdCpuCoreCrystalClockFrequency)
+ GetPerformanceCounterProperties (NULL, NULL)
)
);
}
@@ -129,7 +130,7 @@ TimerInterruptHandler (
PeriodStart += DivU64x32 (
MultU64x32 (
mTimerPeriod,
- PcdGet64 (PcdCpuCoreCrystalClockFrequency)
+ GetPerformanceCounterProperties (NULL, NULL)
),
1000000u
); // convert to tick
@@ -232,7 +233,7 @@ TimerDriverSetTimerPeriod (
PeriodStart += DivU64x32 (
MultU64x32 (
mTimerPeriod,
- PcdGet64 (PcdCpuCoreCrystalClockFrequency)
+ GetPerformanceCounterProperties (NULL, NULL)
),
1000000u
); // convert to tick