[U-Boot] [PATCH v2 09/20] riscv: Implement riscv_get_time() API using rdtime instruction

Auer, Lukas lukas.auer at aisec.fraunhofer.de
Mon Dec 10 23:36:21 UTC 2018


On Fri, 2018-12-07 at 06:14 -0800, Bin Meng wrote:
> From: Anup Patel <anup at 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 at brainfault.org>
> Signed-off-by: Bin Meng <bmeng.cn at 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 at aisec.fraunhofer.de>


More information about the U-Boot mailing list