UefiCpuPkg/CpuDxeRiscV64: Use DT based timer frequency for CPU driver
There is GetPerformanceCounterProperties() that relies on Device Tree to fetch timer frequency and removes the dependency from the PCDs, use that instead. Signed-off-by: Akshay Behl <cap2k4@rivosinc.com> Co-authored-by: Dhaval Sharma <dhaval@rivosinc.com>
This commit is contained in:
committed by
mergify[bot]
parent
8c721d68ea
commit
484930e0c6
@@ -269,7 +269,7 @@ CpuGetTimerValue (
|
||||
if (TimerPeriod != NULL) {
|
||||
*TimerPeriod = DivU64x32 (
|
||||
1000000000000000u,
|
||||
PcdGet64 (PcdCpuCoreCrystalClockFrequency)
|
||||
GetPerformanceCounterProperties (NULL, NULL)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <Library/BaseRiscVFpuLib.h>
|
||||
#include <Library/BaseRiscVSbiLib.h>
|
||||
#include <Library/BaseRiscVMmuLib.h>
|
||||
#include <Library/TimerLib.h>
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/CacheMaintenanceLib.h>
|
||||
#include <Library/CpuExceptionHandlerLib.h>
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
RiscVMmuLib
|
||||
RiscVFpuLib
|
||||
CacheMaintenanceLib
|
||||
TimerLib
|
||||
|
||||
[Sources]
|
||||
CpuDxe.c
|
||||
@@ -62,7 +63,6 @@
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdNullPointerDetectionPropertyMask ## CONSUMES
|
||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuStackSwitchExceptionList ## CONSUMES
|
||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuKnownGoodStackSize ## CONSUMES
|
||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuCoreCrystalClockFrequency ## CONSUMES
|
||||
|
||||
[Depex]
|
||||
TRUE
|
||||
|
||||
Reference in New Issue
Block a user