riscv: Implement riscv_get_time() API using rdtime instruction
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: NAnup Patel <anup@brainfault.org> Signed-off-by: NBin Meng <bmeng.cn@gmail.com> Reviewed-by: NLukas Auer <lukas.auer@aisec.fraunhofer.de>
Showing
arch/riscv/lib/rdtime.c
0 → 100644
想要评论请 注册 或 登录