-
Notifications
You must be signed in to change notification settings - Fork 685
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] PMP config can not select NA4
mode while granularity is set to 4
#2465
Comments
This is expected behavior. CVA6 does not support low granularity for PMP, and NA4 is the lowest granularity. Spike on the other hand supports all granularities. Actually, the RISC-V privilege spec proposes a similar procedure as the one you posted to determine the granularity supported by a particular core:
|
@Moschn Please consider, in both cases the core has bug and should fix. |
Oh, sorry for that, I did not read your issue thoroughly enough. I found the regression and proposed a fix in #2469. |
Is there an existing CVA6 bug for this?
Bug Description
While the granularity of the PMP can determine by following code is 4 bytes:
a3 = 0x003FFFFFFFFFFFFF
so, the least-significant bit that set is 0, so the PMP granularity is 4 bytes.But CVA6 does not support setting the
NA4
address matching mode. In other words, if we set the address matching mode to0x2
, the core rewrites the register with0x0
, which means no protection.To reproduce, execute following instruction:
However, if you execute same code on Spike you will get
trap_load_access_fault
exception.The text was updated successfully, but these errors were encountered: