From fad99cec99c30a1ef79d0daa53bbd796c632e538 Mon Sep 17 00:00:00 2001 From: Pentin Alexander Sergeevich <30556064+pentin-as@users.noreply.github.com> Date: Mon, 1 Jul 2019 23:52:37 +0500 Subject: pmp: first set the address, then cfg (#194) --- benchmarks/pmp/pmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/pmp/pmp.c b/benchmarks/pmp/pmp.c index 195a575..2ccd769 100644 --- a/benchmarks/pmp/pmp.c +++ b/benchmarks/pmp/pmp.c @@ -44,8 +44,8 @@ static void init_pt() #endif write_csr(sptbr, ((uintptr_t)l1pt >> RISCV_PGSHIFT) | (vm_choice * (SATP_MODE & ~(SATP_MODE<<1)))); - write_csr(pmpcfg0, (PMP_NAPOT | PMP_R) << 16); write_csr(pmpaddr2, -1); + write_csr(pmpcfg0, (PMP_NAPOT | PMP_R) << 16); } INLINE uintptr_t va2pa(uintptr_t va) -- cgit v1.1