summaryrefslogtreecommitdiff
path: root/include/sbi/sbi_emulate_csr.h
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2019-08-18 10:44:44 +0300
committerAnup Patel <anup@brainfault.org>2019-09-30 13:06:14 +0300
commit1e9f88889f8b7c66dd229299715eed87e734aafa (patch)
tree8c1619786e090dfc7cbb57223ac3edda86607ec5 /include/sbi/sbi_emulate_csr.h
parent7d4420bd6929ef3f2c761c262dbc3f7f2ae150c2 (diff)
downloadopensbi-1e9f88889f8b7c66dd229299715eed87e734aafa.tar.xz
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_emulate_csr.h')
-rw-r--r--include/sbi/sbi_emulate_csr.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/sbi/sbi_emulate_csr.h b/include/sbi/sbi_emulate_csr.h
index 5d1755f..fe357e5 100644
--- a/include/sbi/sbi_emulate_csr.h
+++ b/include/sbi/sbi_emulate_csr.h
@@ -12,12 +12,13 @@
#include <sbi/sbi_types.h>
+struct sbi_trap_regs;
struct sbi_scratch;
-int sbi_emulate_csr_read(int csr_num, u32 hartid, ulong mstatus,
+int sbi_emulate_csr_read(int csr_num, u32 hartid, struct sbi_trap_regs *regs,
struct sbi_scratch *scratch, ulong *csr_val);
-int sbi_emulate_csr_write(int csr_num, u32 hartid, ulong mstatus,
+int sbi_emulate_csr_write(int csr_num, u32 hartid, struct sbi_trap_regs *regs,
struct sbi_scratch *scratch, ulong csr_val);
#endif