aboutsummaryrefslogtreecommitdiff
path: root/riscv/mmu.h
diff options
context:
space:
mode:
authorAndrew Waterman <aswaterman@gmail.com>2019-01-28 10:55:05 -0800
committerDave.Wen <dave.wen@sifive.com>2019-04-06 00:03:30 +0800
commit024fcba5696bd3560db16d4e6ee36f170876281f (patch)
tree443938756d449154a2b3c69fd0e61ad373621571 /riscv/mmu.h
parent86f5029d6ced0c72243bbf2c384fff42df11d97d (diff)
downloadspike-024fcba5696bd3560db16d4e6ee36f170876281f.zip
spike-024fcba5696bd3560db16d4e6ee36f170876281f.tar.gz
spike-024fcba5696bd3560db16d4e6ee36f170876281f.tar.bz2
Fix PMP checks for partially-matching accesses (#270)
PMP checks should unconditionally fail if the PMP matches part of, but not all of, an access. We got this right, but went too far: we checked whether _any_ PMP matches in this manner. In fact, only the first PMP that maches any of the bytes should be checked in this manner.
Diffstat (limited to 'riscv/mmu.h')
-rw-r--r--riscv/mmu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/mmu.h b/riscv/mmu.h
index 7617367..5fa93ff 100644
--- a/riscv/mmu.h
+++ b/riscv/mmu.h
@@ -354,7 +354,7 @@ private:
}
reg_t pmp_homogeneous(reg_t addr, reg_t len);
- reg_t pmp_ok(reg_t addr, access_type type, reg_t mode);
+ reg_t pmp_ok(reg_t addr, reg_t len, access_type type, reg_t mode);
bool check_triggers_fetch;
bool check_triggers_load;