diff options
author | Pentin Alexander Sergeevich <30556064+pentin-as@users.noreply.github.com> | 2019-07-01 23:52:37 +0500 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2019-07-01 11:52:37 -0700 |
commit | fad99cec99c30a1ef79d0daa53bbd796c632e538 (patch) | |
tree | d8d3553949e340e6228d79a25af22acfdbb080c8 | |
parent | a2456ef50d41bb5679b1cd73372bbc1ea1c1268a (diff) | |
download | riscv-tests-fad99cec99c30a1ef79d0daa53bbd796c632e538.zip riscv-tests-fad99cec99c30a1ef79d0daa53bbd796c632e538.tar.gz riscv-tests-fad99cec99c30a1ef79d0daa53bbd796c632e538.tar.bz2 |
pmp: first set the address, then cfg (#194)
-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 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) |