diff --git a/stand/libsa/tslog.c b/stand/libsa/tslog.c index 7ea18e0bb8f8..c6164aab02a9 100644 --- a/stand/libsa/tslog.c +++ b/stand/libsa/tslog.c @@ -29,7 +29,11 @@ __FBSDID("$FreeBSD$"); #include +#if defined(__amd64__) || defined(__i386__) #include +#elif defined(__aarch64__) +#include +#endif #include @@ -60,6 +64,8 @@ tslog(const char * type, const char * f, const char * s) { #if defined(__amd64__) || defined(__i386__) uint64_t tsc = rdtsc(); +#elif defined(__aarch64__) + uint64_t tsc = READ_SPECIALREG(cntvct_el0); #else uint64_t tsc = 0; #endif