1
0

Explicitly zap some S-mode CSRs when not using S-mode

This commit is contained in:
Andrew Waterman 2016-10-04 22:23:20 -07:00
parent 968851f7e3
commit 67593fdf2d

View File

@ -626,6 +626,16 @@ class CSRFile(implicit p: Parameters) extends CoreModule()(p)
reg_mip := io.interrupts
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
if (nBreakpoints <= 1) reg_tselect := 0
if (nBreakpoints >= 1)