Re: Question about mip and vsip


Greg Favor
 

On Sat, Nov 26, 2022 at 4:38 AM Oscar Jupp <jupposcar@...> wrote:
Dear architect,
CSR mip and vsip are both WARL. But SPEC did not specify that :
1.  Are the fields VSEIP,VSSIP,VSTIP in mip real-only ? Can M-mode software modify these bit fields?

Priv section 9.4.3 defines these bits as aliases (of bits in hip), so yes - M-mode software can modify these bits.

2.  Are the fields SEIP,SSIP,STIP in vsip real-only ? Can VS-mode software modify these bit fields?

The vsip CSR - as with all vs* CSRs - is only accessible by HS-mode (and M-mode).  As the vsip definition says, "When V=1, vsip and vsie substitute for the usual sip and sie, so instructions that normally read or modify sip/sie actually access vsip/vsie instead."

In other words, VS-mode software (just like S/HS-mode software) has read/write access to sip, but in the case of VS-mode software (i.e. V=1) it actually accesses vsip and not sip.

Greg

Join {tech-privileged@lists.riscv.org to automatically receive all group messages.