riscv: Mask mepc[0] and sepc[0]#27
Conversation
|
Thank You for your contribution. We have been able to verify that the change to mask mepc[0] and sepc[0] is correct, and we will be merging it into the codebase. We would like to ask you to explain the reasoning behind masking out the |
|
Hello, thank you for your reply. I should clarify that my intention wasn't to claim that the entire Currently, tlib stores the full written value directly, so writing all ones makes every field read back as one. The RISC-V Privileged Architecture specification requires the following fields to be read-only zero when their related extensions are not implemented:
From my inspection, tlib does not appear to explicitly support these extensions.
I agree that using a zero mask for the entire register is too broad because it also clears unrelated fields such as
I will remove the current |
|
I have updated the PR. The |
This PR fixes RISC-V CSR field masking in tlib.
It masks mepc[0] and sepc[0], which are architecturally hardwired to zero.
Related to renode/renode#905
Related to renode/renode#906