bugfix, mbadaddr should be writable
authorYunsup Lee <yunsup@cs.berkeley.edu>
Tue, 17 Mar 2015 11:33:17 +0000 (04:33 -0700)
committerYunsup Lee <yunsup@cs.berkeley.edu>
Tue, 17 Mar 2015 11:33:23 +0000 (04:33 -0700)
riscv/processor.cc

index 335cbeab68f685b0bf2167a1be1a2ea639c7fa10..c2d52751a188d46bee453026b8e29afc8cb3972c 100644 (file)
@@ -398,6 +398,7 @@ void processor_t::set_csr(int which, reg_t val)
     case CSR_MEPC: state.mepc = val; break;
     case CSR_MSCRATCH: state.mscratch = val; break;
     case CSR_MCAUSE: state.mcause = val; break;
+    case CSR_MBADADDR: state.mbadaddr = val; break;
     case CSR_SEND_IPI: sim->send_ipi(val); break;
     case CSR_TOHOST:
       if (state.tohost == 0)