From 6201d0ee2c20baf907079d9da7bae559a27f9382 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Tue, 10 May 2016 11:36:33 -0700 Subject: [PATCH] Ignore MPRV in Debug Mode. --- riscv/mmu.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } -- 2.30.2