Mirroring of mstatus.mpp wrong when writing mcause #640
Labels
Component:RTL
For issues in the RTL (e.g. for files in the rtl directory)
Status:Resolved
Issue has been resolved, but closure is pending on git merge and/or issuer confirmation
Type:Bug
For bugs in any content (RTL, Documentation, etc.)
Upon mcause_we, the the value written to mstatus.mpp is taken from wrong bit indices (from cv32e40x_cs_registers):
mstatus_n.mpp = mstatus_mpp_resolve(mstatus_rdata.mpp, csr_wdata_int[MSTATUS_MPP_BIT_HIGH:MSTATUS_MPP_BIT_LOW]);
Indices from mcause (not mstatus) should be used.
For e40x mstatus_mpp_resolve() will always return PRIV_LVL_M, so it will not result in a real issue. Code should be cleaned up though.
The text was updated successfully, but these errors were encountered: