summaryrefslogtreecommitdiffstats
path: root/src/boot/efi/ticks.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/efi/ticks.c')
-rw-r--r--src/boot/efi/ticks.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/boot/efi/ticks.c b/src/boot/efi/ticks.c
index 45980bafe8..dd8c06a53e 100644
--- a/src/boot/efi/ticks.c
+++ b/src/boot/efi/ticks.c
@@ -27,8 +27,8 @@ static BOOLEAN in_hypervisor(void) {
#endif
#ifdef __x86_64__
-static UINT64 ticks_read(void) {
- UINT64 a, d;
+static uint64_t ticks_read(void) {
+ uint64_t a, d;
if (in_hypervisor())
return 0;
@@ -37,8 +37,8 @@ static UINT64 ticks_read(void) {
return (d << 32) | a;
}
#elif defined(__i386__)
-static UINT64 ticks_read(void) {
- UINT64 val;
+static uint64_t ticks_read(void) {
+ uint64_t val;
if (in_hypervisor())
return 0;
@@ -47,28 +47,28 @@ static UINT64 ticks_read(void) {
return val;
}
#elif defined(__aarch64__)
-static UINT64 ticks_read(void) {
- UINT64 val;
+static uint64_t ticks_read(void) {
+ uint64_t val;
__asm__ volatile ("mrs %0, cntpct_el0" : "=r" (val));
return val;
}
#else
-static UINT64 ticks_read(void) {
+static uint64_t ticks_read(void) {
return 0;
}
#endif
#if defined(__aarch64__)
-static UINT64 ticks_freq(void) {
- UINT64 freq;
+static uint64_t ticks_freq(void) {
+ uint64_t freq;
__asm__ volatile ("mrs %0, cntfrq_el0": "=r" (freq));
return freq;
}
#else
/* count TSC ticks during a millisecond delay */
-static UINT64 ticks_freq(void) {
- UINT64 ticks_start, ticks_end;
- static UINT64 cache = 0;
+static uint64_t ticks_freq(void) {
+ uint64_t ticks_start, ticks_end;
+ static uint64_t cache = 0;
if (cache != 0)
return cache;
@@ -86,8 +86,8 @@ static UINT64 ticks_freq(void) {
}
#endif
-UINT64 time_usec(void) {
- UINT64 ticks, freq;
+uint64_t time_usec(void) {
+ uint64_t ticks, freq;
ticks = ticks_read();
if (ticks == 0)