Set PRV=M when entering debug mode
Debug mode mostly behaves like M-mode, so this approach avoids having to check the debug bit in most permission checks.
This commit is contained in:
@ -63,7 +63,7 @@ class TLB(entries: Int)(implicit edge: TLEdgeOut, p: Parameters) extends CoreMod
|
||||
val do_mprv = io.ptw.status.mprv && !io.req.bits.instruction
|
||||
val priv = Mux(do_mprv, io.ptw.status.mpp, io.ptw.status.prv)
|
||||
val priv_s = priv === PRV.S
|
||||
val priv_uses_vm = priv <= PRV.S && !io.ptw.status.debug
|
||||
val priv_uses_vm = priv <= PRV.S
|
||||
val vm_enabled = Bool(usingVM) && io.ptw.ptbr.mode(io.ptw.ptbr.mode.getWidth-1) && priv_uses_vm && !io.req.bits.passthrough
|
||||
|
||||
// share a single physical memory attribute checker (unshare if critical path)
|
||||
|
Reference in New Issue
Block a user