diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-02-03 23:38:29 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-02-03 23:38:29 -0800 |
commit | bea283531abfd013811e83c75ff6189a0d9b3075 (patch) | |
tree | b69005d3e4dd119f10d5cee05350773ebd02f724 /riscv/mmu.cc | |
parent | 853391c2bb814451ad88b8dbff2aec8616fc6a12 (diff) | |
download | spike-bea283531abfd013811e83c75ff6189a0d9b3075.zip spike-bea283531abfd013811e83c75ff6189a0d9b3075.tar.gz spike-bea283531abfd013811e83c75ff6189a0d9b3075.tar.bz2 |
Actually refill ITLB on ITLB miss
oops.
Diffstat (limited to 'riscv/mmu.cc')
-rw-r--r-- | riscv/mmu.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/riscv/mmu.cc b/riscv/mmu.cc index 4558b1e..0073a8a 100644 --- a/riscv/mmu.cc +++ b/riscv/mmu.cc @@ -50,7 +50,9 @@ reg_t mmu_t::translate(reg_t addr, access_type type) const uint16_t* mmu_t::fetch_slow_path(reg_t addr) { reg_t paddr = translate(addr, FETCH); - if (paddr >= memsz) + if (paddr < memsz) + refill_tlb(addr, paddr, FETCH); + else throw trap_instruction_access_fault(addr); return (const uint16_t*)(mem + paddr); } |