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
[Bug Report] Incorrect exception type of PMP violation during address translation #906
Comments
Fixes openhwgroup#906 According to the spec: > If accessing pte violates a PMA or PMP check, raise an access-fault > exception corresponding to the original access type. Found by @Phantom1003 and @ProjectDimlight Signed-off-by: Moritz Schneider <moritz.schneider@inf.ethz.ch>
|
Thanks for reporting this. I proposed a fix in #908. Can you try if this solves your issues? |
|
Thanks @Moschn. |
|
Thanks, cva6 throws a correct Store Access Fault exception, but the *tval seems filled with the physical address instead of the virtual address: The related verse in specification is:
|
Fixes openhwgroup#906 According to the spec: > If accessing pte violates a PMA or PMP check, raise an access-fault > exception corresponding to the original access type. Found by @Phantom1003 and @ProjectDimlight Signed-off-by: Moritz Schneider <moritz.schneider@inf.ethz.ch>
|
I just read this section of the spec and it seems to be a bit ambiguous. Yes I force pushed the fix to #908. Can you check if it passes your tests now? |
|
Yes, I agree with your understanding. |
Fixes #906 According to the spec: > If accessing pte violates a PMA or PMP check, raise an access-fault > exception corresponding to the original access type. Found by @Phantom1003 and @ProjectDimlight Signed-off-by: Moritz Schneider <moritz.schneider@inf.ethz.ch>
Our co-simulation framework found that the exception type of address translation PMP violation is incorrect.
In the following test case, we let a non-leaf (level 2) PTE out of the PMP range.
Next, we will perform a store operation with a special virtual address, during translation processor will try to access the PTE that does not match any PMP.
cva6 throws a load access fault, while spike throws a store access fault.
According to riscv-privileged specification:
Hence, cva6 should throw a store access fault.
cva6-9.zip
The text was updated successfully, but these errors were encountered: