Re: Question about mip and vsip
Thanks for your reply.
1. You said : “Priv section 9.4.3 defines these bits as aliases (of bits in hip), so yes - M-mode software can modify these bits.”
But I don’t know they are read-only aliases ? or read-write aliases ? In other word, Can the CSR instruction with the CSR number 0x344 (mip) modify these bits? Or only CSR instruction with the CSR number 0x644 (hip) can modify these bits?
2. The ISA said : “If implemented, SEIP is read-only in sip."(Priv section 4.3.1)
It means sip.SEIP is read-only for S-mode. Similarly, is vsip.SEIP read-only for VS-mode ?
---- Replied Message ----
On Sat, Nov 26, 2022 at 4:38 AM Oscar Jupp <jupposcar@...> wrote:
Priv section 9.4.3 defines these bits as aliases (of bits in hip), so yes - M-mode software can modify these bits.
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.