diff options
author | Anup Patel <anup.patel@wdc.com> | 2019-08-18 13:14:44 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-09-30 15:36:14 +0530 |
commit | 1e9f88889f8b7c66dd229299715eed87e734aafa (patch) | |
tree | 8c1619786e090dfc7cbb57223ac3edda86607ec5 /include/sbi/sbi_timer.h | |
parent | 7d4420bd6929ef3f2c761c262dbc3f7f2ae150c2 (diff) |
lib: Emulate HTIMEDELTA CSR for platforms not having TIME CSR
For platforms not having TIME CSR, we trap-n-emulate TIME CSR
read/write in OpenSBI. Same rationale applies to HTIMEDELTA CSR
as well so we trap-n-emulate HTIMEDELTA CSR for platforms not
having TIME CSR.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'include/sbi/sbi_timer.h')
-rw-r--r-- | include/sbi/sbi_timer.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sbi/sbi_timer.h b/include/sbi/sbi_timer.h index e40cce9..c14c8d0 100644 --- a/include/sbi/sbi_timer.h +++ b/include/sbi/sbi_timer.h @@ -16,6 +16,14 @@ struct sbi_scratch; u64 sbi_timer_value(struct sbi_scratch *scratch); +u64 sbi_timer_virt_value(struct sbi_scratch *scratch); + +u64 sbi_timer_get_delta(struct sbi_scratch *scratch); + +void sbi_timer_set_delta(struct sbi_scratch *scratch, ulong delta); + +void sbi_timer_set_delta_upper(struct sbi_scratch *scratch, ulong delta_upper); + void sbi_timer_event_stop(struct sbi_scratch *scratch); void sbi_timer_event_start(struct sbi_scratch *scratch, u64 next_event); |