
11 Dec
2018
11 Dec
'18
12:36 a.m.
On Fri, 2018-12-07 at 06:14 -0800, Bin Meng wrote:
From: Anup Patel anup@brainfault.org
This adds an implementation of riscv_get_time() API that is using rdtime instruction.
This is the case for S-mode U-Boot, and is useful for processors that support rdtime in M-mode too.
Signed-off-by: Anup Patel anup@brainfault.org Signed-off-by: Bin Meng bmeng.cn@gmail.com
Changes in v2:
- incorporated and reworked Anup's S-mode timer patch @ http://patchwork.ozlabs.org/patch/1006663/
arch/riscv/Kconfig | 8 ++++++++ arch/riscv/lib/Makefile | 1 + arch/riscv/lib/rdtime.c | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 arch/riscv/lib/rdtime.c
Reviewed-by: Lukas Auer lukas.auer@aisec.fraunhofer.de