-
Notifications
You must be signed in to change notification settings - Fork 669
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
Unexpected Modification of xstatus
WPRI Field During menvcfg
Reads/Writes
#3934
Unexpected Modification of xstatus
WPRI Field During menvcfg
Reads/Writes
#3934
Comments
@youzi27 In your example, this is exactly the case: writing to XiangShan's implementation treats the SPIKE, on the other hand, implements this read-only field as WLRL (Write Limited Read Legal), which means writes are also constrained to 0. As a result, SPIKE retains the value of 0 even after We will work to unify the implementations of NEMU and SPIKE to align with XiangShan in the future to ensure they pass difftest successfully. |
Hi @lewislzh , Thank you for your patient explanation. The RISC-V privileged version I was using (2024-02-13) lacked an explanation about SDT, so I have updated my privileged specification. However, there are still some questions I hope you can clarify. According to the privileged specification I referenced, my testcase occurred in M-mode.
I would greatly appreciate it if you could provide further clarification. Thank you! |
Fortunately, I found similar questions and answers for your reference (riscv/riscv-isa-manual#1623). I look forward to your further explanation. Thank you very much. |
Thank you for your issue. The read/write accessibility of |
Thank you for your response. I look forward to your fix for this issue. |
Before start
Describe the bug
Hi there,
When performing carefully crafted reads and writes(
csrrs
) to themenvcfg
register in M-mode on XiangShan, the WPRI (Reserved Writes Preserve Values, Reads Ignore Values) field inxstatus
is unexpectedly modified to 1. This behavior is not observed in either NEMU or SPIKE.Screenshots
Expected behavior
xstatus
should remain unmodified during reads or writes tomenvcfg
, as specified by the RISC-V privileged architecture specification.To Reproduce
testcase: test.zip
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: