aboutsummaryrefslogtreecommitdiff
path: root/riscv/mmu.cc
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2020-02-21 12:16:31 -0800
committerChih-Min Chao <chihmin.chao@sifive.com>2020-03-03 22:48:23 -0800
commit4d72b9b5eeb34bd99272f231cf653602d9ded10d (patch)
tree826806d7bab618945b96029a304ada9c9e2695ef /riscv/mmu.cc
parentff1b5fab38f0d8ddb364bcbb621a172c1834d077 (diff)
downloadspike-4d72b9b5eeb34bd99272f231cf653602d9ded10d.zip
spike-4d72b9b5eeb34bd99272f231cf653602d9ded10d.tar.gz
spike-4d72b9b5eeb34bd99272f231cf653602d9ded10d.tar.bz2
Allow debug accesses from MMUs not bound to processors
Diffstat (limited to 'riscv/mmu.cc')
-rw-r--r--riscv/mmu.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/mmu.cc b/riscv/mmu.cc
index b7d49d4..1e8dd8b 100644
--- a/riscv/mmu.cc
+++ b/riscv/mmu.cc
@@ -104,7 +104,7 @@ reg_t reg_from_bytes(size_t len, const uint8_t* bytes)
bool mmu_t::mmio_ok(reg_t addr, access_type type)
{
// Disallow access to debug region when not in debug mode
- if (addr >= DEBUG_START && addr <= DEBUG_END && !proc->state.debug_mode)
+ if (addr >= DEBUG_START && addr <= DEBUG_END && proc && !proc->state.debug_mode)
return false;
return true;