From c624e731bd95b61f7f08b885b1897fdb5ccaee00 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 5 May 2021 11:34:44 -0700 Subject: 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. --- machine/mtrap.c | 2 +- pk/entry.S | 2 +- 2 files changed, 2 insertions(+), 2 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)); diff --git a/pk/entry.S b/pk/entry.S index 5bbf697..48db0d9 100644 --- a/pk/entry.S +++ b/pk/entry.S @@ -40,7 +40,7 @@ csrrw t0,sscratch,x0 csrr s0,sstatus csrr t1,sepc - csrr t2,sbadaddr + csrr t2,stval csrr t3,scause STORE t0,2*REGBYTES(x2) STORE s0,32*REGBYTES(x2) -- cgit v1.1