Commit ec0d2a7d authored by Atish Patra's avatar Atish Patra Committed by Anup Patel
Browse files

lib: timer: Provide a hart based timer feature



As per the RISC-V specification, time value can be obtained from a time
CSR implemented in hardware or a MMIO based IP block. Qemu virt machine
already supports timer csr while CLINT provides the timer for other
platforms.

Implement a hart specific timer feature that can be detected at runtime.
As CSR based timer implementation are faster than MMIO address based, it
is always preferred over MMIO based one.

Signed-off-by: default avatarAtish Patra <atish.patra@wdc.com>
Tested-by: default avatarJonathan Balkind <jbalkind@cs.princeton.edu>
Reviewed-by: default avatarAnup Patel <anup.patel@wdc.com>
parent 49380244
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment