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
}
read64
uint64_t read64(const void *addr)
timer_monotonic_get
void timer_monotonic_get(struct mono_time *mt)
Definition:
arch_timer.c:6
die
void __noreturn die(const char *fmt,...)
Definition:
die.c:17
console.h
encoding.h
mmio.h
mono_time_set_usecs
static void mono_time_set_usecs(struct mono_time *mt, long us)
Definition:
timer.h:53
mcall.h
HLS
#define HLS()
Definition:
mcall.h:63
NULL
#define NULL
Definition:
stddef.h:19
mono_time
Definition:
timer.h:19
src
arch
riscv
arch_timer.c
Generated by
1.9.1