This also drops individual copyright notices, all mentioned authors in that part of the tree are already listed in AUTHORS. Change-Id: Ic5eddc961d015328e5a90994b7963e7af83cddd3 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39279 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
14 lines
354 B
C
14 lines
354 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/* This file is part of the coreboot project. */
|
|
|
|
#include <timer.h>
|
|
#include <arch/lib_helpers.h>
|
|
|
|
void timer_monotonic_get(struct mono_time *mt)
|
|
{
|
|
uint64_t tvalue = raw_read_cntpct_el0();
|
|
uint32_t tfreq = raw_read_cntfrq_el0();
|
|
long usecs = (tvalue * 1000000) / tfreq;
|
|
mono_time_set_usecs(mt, usecs);
|
|
}
|