Explicitly zap some S-mode CSRs when not using S-mode
This commit is contained in:
parent
968851f7e3
commit
67593fdf2d
@ -626,6 +626,16 @@ class CSRFile(implicit p: Parameters) extends CoreModule()(p)
|
|||||||
reg_mip := io.interrupts
|
reg_mip := io.interrupts
|
||||||
reg_dcsr.debugint := io.interrupts.debug
|
reg_dcsr.debugint := io.interrupts.debug
|
||||||
|
|
||||||
|
if (!usingVM) {
|
||||||
|
reg_mideleg := 0
|
||||||
|
reg_medeleg := 0
|
||||||
|
reg_mscounteren := 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!usingUser) {
|
||||||
|
reg_mucounteren := 0
|
||||||
|
}
|
||||||
|
|
||||||
reg_sptbr.asid := 0
|
reg_sptbr.asid := 0
|
||||||
if (nBreakpoints <= 1) reg_tselect := 0
|
if (nBreakpoints <= 1) reg_tselect := 0
|
||||||
if (nBreakpoints >= 1)
|
if (nBreakpoints >= 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user