coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
arch_timer.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <device/mmio.h>
4 #include <arch/encoding.h>
5 #include <console/console.h>
6 #include <timer.h>
7 #include <mcall.h>
8 
9 void timer_monotonic_get(struct mono_time *mt)
10 {
11  if (HLS()->time == NULL)
12  die("time not set in HLS");
13  mono_time_set_usecs(mt, (long)read64((void *)(HLS()->time)));
14 }
uint64_t read64(const void *addr)
void timer_monotonic_get(struct mono_time *mt)
Definition: arch_timer.c:6
void __noreturn die(const char *fmt,...)
Definition: die.c:17
static void mono_time_set_usecs(struct mono_time *mt, long us)
Definition: timer.h:53
#define HLS()
Definition: mcall.h:63
#define NULL
Definition: stddef.h:19