aboutsummaryrefslogtreecommitdiff
path: root/machine/mtrap.c
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2021-05-05 11:34:44 -0700
committerGitHub <noreply@github.com>2021-05-05 11:34:44 -0700
commitc624e731bd95b61f7f08b885b1897fdb5ccaee00 (patch)
tree026c52bc3e5efab3c8c57541b00723472011f546 /machine/mtrap.c
parent12edfed73d2f601f7a23fded0d40a68cee958a2c (diff)
downloadriscv-pk-c624e731bd95b61f7f08b885b1897fdb5ccaee00.zip
riscv-pk-c624e731bd95b61f7f08b885b1897fdb5ccaee00.tar.gz
riscv-pk-c624e731bd95b61f7f08b885b1897fdb5ccaee00.tar.bz2
replace `sbadaddr` with `stval` (#243)
This replaces use of the old `sbadaddr` CSR name with the current `stval` name. The old spelling is not supported by the LLVM IAS, however, the modern spelling is supported by both LLVM and binutils.
Diffstat (limited to 'machine/mtrap.c')
-rw-r--r--machine/mtrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/machine/mtrap.c b/machine/mtrap.c
index 1acf802..1794675 100644
--- a/machine/mtrap.c
+++ b/machine/mtrap.c
@@ -178,7 +178,7 @@ send_ipi:
void redirect_trap(uintptr_t epc, uintptr_t mstatus, uintptr_t badaddr)
{
- write_csr(sbadaddr, badaddr);
+ write_csr(stval, badaddr);
write_csr(sepc, epc);
write_csr(scause, read_csr(mcause));
write_csr(mepc, read_csr(stvec));