mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg: CpuTimerDxeRiscV64: Fix timer event not working correctly
The timer notify function should be called with timer period, not the value read from timer register. Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
This commit is contained in:
parent
5a13f5c2fa
commit
ad7d3ace1a
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue