Attention is currently required from: Philipp Hug, ron minnich.
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/74569 )
Change subject: arch/riscv/trap_handler.c: Use new names for CSR ......................................................................
arch/riscv/trap_handler.c: Use new names for CSR
sbadaddr and mbadaddr are deprecated names. This fixes compilation with clang.
Change-Id: I5c8fa82b6131dec10f55e8ebcf36b34e30b57bad Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/riscv/trap_handler.c M src/arch/riscv/trap_util.S 2 files changed, 14 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/69/74569/1
diff --git a/src/arch/riscv/trap_handler.c b/src/arch/riscv/trap_handler.c index f5953d3..8cb27de 100644 --- a/src/arch/riscv/trap_handler.c +++ b/src/arch/riscv/trap_handler.c @@ -150,7 +150,7 @@ /* This function used to redirect trap to s-mode. */ void redirect_trap(void) { - write_csr(sbadaddr, read_csr(mbadaddr)); + write_csr(stval, read_csr(mtval)); write_csr(sepc, read_csr(mepc)); write_csr(scause, read_csr(mcause)); write_csr(mepc, read_csr(stvec)); diff --git a/src/arch/riscv/trap_util.S b/src/arch/riscv/trap_util.S index 6b03eb5..c5691c5 100644 --- a/src/arch/riscv/trap_util.S +++ b/src/arch/riscv/trap_util.S @@ -80,7 +80,7 @@ csrrw t0,mscratch,x0 csrr s0,mstatus csrr t1,mepc - csrr t2,mbadaddr + csrr t2,mtval csrr t3,mcause STORE t0,2*REGBYTES(x2) STORE s0,32*REGBYTES(x2)