Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirroring of mstatus.mpp wrong when writing mcause #640

Closed
silabs-oivind opened this issue Aug 15, 2022 · 1 comment
Closed

Mirroring of mstatus.mpp wrong when writing mcause #640

silabs-oivind opened this issue Aug 15, 2022 · 1 comment
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.)

Comments

@silabs-oivind
Copy link
Contributor

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.

@Silabs-ArjanB Silabs-ArjanB added Component:RTL For issues in the RTL (e.g. for files in the rtl directory) Type:Bug For bugs in any content (RTL, Documentation, etc.) labels Aug 15, 2022
@Silabs-ArjanB Silabs-ArjanB added the Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation label Aug 23, 2022
@Silabs-ArjanB
Copy link
Contributor

@silabs-oivind Please close this issue if you agree it has been solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.)
Projects
None yet
Development

No branches or pull requests

2 participants