aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/pmp
diff options
context:
space:
mode:
authorPascal Cotret <pascal.cotret@gmail.com>2023-02-14 00:19:03 +0100
committerGitHub <noreply@github.com>2023-02-13 15:19:03 -0800
commit24dabfa36e7678a1b665c376d041e64bdc92feb5 (patch)
treed7c97b56dc347335f289c73d23ed78681ccf3ff9 /benchmarks/pmp
parentf163ddfc9b0bf78fb8180012ffcfc93427f780f0 (diff)
downloadriscv-tests-24dabfa36e7678a1b665c376d041e64bdc92feb5.zip
riscv-tests-24dabfa36e7678a1b665c376d041e64bdc92feb5.tar.gz
riscv-tests-24dabfa36e7678a1b665c376d041e64bdc92feb5.tar.bz2
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 <pascal.cotret@gmail.com>
Diffstat (limited to 'benchmarks/pmp')
-rw-r--r--benchmarks/pmp/pmp.c2
1 files changed, 1 insertions, 1 deletions
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);