From: Tim Newsome Date: Tue, 10 May 2016 18:36:33 +0000 (-0700) Subject: Ignore MPRV in Debug Mode. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6201d0ee2c20baf907079d9da7bae559a27f9382;p=riscv-isa-sim.git Ignore MPRV in Debug Mode. --- diff --git a/riscv/mmu.cc b/riscv/mmu.cc index b88cade..e44c027 100644 --- a/riscv/mmu.cc +++ b/riscv/mmu.cc @@ -37,7 +37,7 @@ reg_t mmu_t::translate(reg_t addr, access_type type) reg_t mode = proc->state.prv; bool pum = false; if (type != FETCH) { - if (get_field(proc->state.mstatus, MSTATUS_MPRV)) + if (!proc->state.dcsr.cause && get_field(proc->state.mstatus, MSTATUS_MPRV)) mode = get_field(proc->state.mstatus, MSTATUS_MPP); pum = (mode == PRV_S && get_field(proc->state.mstatus, MSTATUS_PUM)); }