Add Time_GetTSC code for ARM64
This commit is contained in:
parent
081043f8f1
commit
944a67a596
@ -12,7 +12,17 @@
|
|||||||
uint64_t
|
uint64_t
|
||||||
Time_GetTSC()
|
Time_GetTSC()
|
||||||
{
|
{
|
||||||
return 0;
|
uint64_t ui;
|
||||||
|
asm volatile("mrs %0, CNTVCT_EL0" : "=&r" (ui));
|
||||||
|
return ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t
|
||||||
|
Time_GetTSCFreq()
|
||||||
|
{
|
||||||
|
uint64_t ui;
|
||||||
|
asm volatile("mrs %0, CNTFRQ_EL0" : "=&r" (ui));
|
||||||
|
return ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user