diff options
-rw-r--r-- | benchmarks/pmp/pmp.c | 2 |
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); |