From 24dabfa36e7678a1b665c376d041e64bdc92feb5 Mon Sep 17 00:00:00 2001 From: Pascal Cotret Date: Tue, 14 Feb 2023 00:19:03 +0100 Subject: Update register name to satp (#455) Related to issue https://github.com/riscv-software-src/riscv-tests/issues/453 It seems to be the only modification needed there. It may break backward compatibility with (very?) old compilers. Signed-off-by: Pascal Cotret --- benchmarks/pmp/pmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'benchmarks/pmp') diff --git a/benchmarks/pmp/pmp.c b/benchmarks/pmp/pmp.c index ec07e4a..3d82105 100644 --- a/benchmarks/pmp/pmp.c +++ b/benchmarks/pmp/pmp.c @@ -43,7 +43,7 @@ static void init_pt() #else uintptr_t vm_choice = SATP_MODE_SV32; #endif - write_csr(sptbr, ((uintptr_t)l1pt >> RISCV_PGSHIFT) | + write_csr(satp, ((uintptr_t)l1pt >> RISCV_PGSHIFT) | (vm_choice * (SATP_MODE & ~(SATP_MODE<<1)))); write_csr(pmpaddr2, -1); write_csr(pmpcfg0, (PMP_NAPOT | PMP_R) << 16); -- cgit v1.1