-
Notifications
You must be signed in to change notification settings - Fork 215
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
PMP tests assume 4-byte granularity #580
Comments
I agree. The tests are being rewritten to take a granularity variable
(currently from the DUT specific RVMODEL_BOOT macro, I believe.
It will default to granularity of 4B if not defined in that macro.
…On Wed, Dec 18, 2024 at 7:26 AM marcfedorow ***@***.***> wrote:
#577 <#577> is
just a special case of this problem.
Tests that check NA4 / NAPOT and do not set 'X' flag just trap and never
finish because nothing is allowed to execute from the region that contains
the test's code.
Still, other tests' signatures don't match because of the wrong
accumptions (i.e. 4-byte granularity).
—
Reply to this email directly, view it on GitHub
<#580>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHPXVJQOB7C7HU5CHDRW24L2GGH2PAVCNFSM6AAAAABT26TWZWVHI2DSMVQWIX3LMV43ASLTON2WKOZSG42DQMJRGU2TSMI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I believe that granularity should be checked by software.
|
The granularity can be checked by SW, but the tests don't need to write &
read it (except to verify that it matches what is claimed).
The tests can be compiled to match the granularity, and don't need case
statements to do different things for different granularity.
Yes, we could do that, but it's much simpler to write tests that compile
for the supported config (it's pretty much just a few of lines of code).
…On Fri, Dec 20, 2024 at 6:26 AM marcfedorow ***@***.***> wrote:
I believe that granularity should be checked by software.
RISC-V priv spec says:
Software may determine the PMP granularity by writing zero to pmp0cfg, then writing all ones
to pmpaddr0, then reading back pmpaddr0. If G is the index of the least-significant bit set, the
PMP granularity is 2^(G+2) bytes
—
Reply to this email directly, view it on GitHub
<#580 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHPXVJUXP7VFKJUVFFYTXET2GQSKDAVCNFSM6AAAAABT26TWZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJXGEYTMOBZGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#577 is just a special case of this problem.
Tests that check NA4 / NAPOT and do not set 'X' flag just trap and never finish because nothing is allowed to execute from the region that contains the test's code.
Still, other tests' signatures don't match because of the wrong accumptions (i.e. 4-byte granularity).
The text was updated successfully, but these errors were encountered: