-
Notifications
You must be signed in to change notification settings - Fork 212
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
Errata in PMP tests #588
Comments
The fence issue seems to be the same as #569 |
We do know about this issue, and it (along with several other issues) are
getting fixed. I'll leave this open until the fix is complete.
The tricky bit is making these tests work with arbitrary granularity.
Execute tests have to be placed at the end of a granularity, else returning
to the test keeps failing.
Large granularity will require large tests full of nops, and there is a
limit to the granularity size that tools allow.
WE are hoping a loader script cna fix this problem, by introducing an
arbitrary gap between the beginning and end of a granularity that doesn't
need to take up space in the elf file.
IF anyone has experience doing that sort of thing, get in touch with me or
Umer or Hammad.
…On Mon, Dec 30, 2024 at 11:44 PM Jordan Carlin ***@***.***> wrote:
The fence issue seems to be the same as #569
<#569>
—
Reply to this email directly, view it on GitHub
<#588 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHPXVJW5VXTIASQWGL4TNLD2IJDOLAVCNFSM6AAAAABUND3XYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRWGIYTANZUGA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Confirmed that lockstep simulation of all 3 RWX tests in both pmp32 and pmp64 mismatch lockstep with ImperasDV even though only the two tests listed above cause signature mismatches. Regarding NOPs, I had a similar issue in testing branch and jump offsets. I ended up putting in enough NOPs to test up to 4k offsets, and assume jumps with an offset of 2^19 still work. Maybe 4k granularity is sufficient for PMP as well? |
@davidharrishmc I agree with your comments, we are also targetting 4k grain limit while testing. Also on pmp32 and pmp64 mismatch, it is strange to see that rv64 picked this fence.i issue while rv32 failed to pick this one, we will look into it in more detail. |
What is the cause of the mismatch? Is it because Sail
does't support configuring granularity?
The problem isn't whether jumps work or not, it's whether the jump target
is executable or not(the tests should be trying cases where is is, and
where it isn't)
The problem with only testing 4K is that if the granularity is larger, then
you're branching into the middle of the larger region, and if execution
isn't allowed, it traps,
and returns to the region which still can't be executed, so you get
thousands of traps until it falls off the end into a different region (that
you hope is executable )
…On Tue, Dec 31, 2024 at 12:06 AM David Harris ***@***.***> wrote:
Confirmed that lockstep simulation of all 3 RWX tests in both pmp32 and
pmp64 mismatch lockstep with ImperasDV even though only the two tests
listed above cause signature mismatches.
Regarding NOPs, I had a similar issue in testing branch and jump offsets.
I ended up putting in enough NOPs to test up to 4k offsets, and assume
jumps with an offset of 2^19 still work. Maybe 4k granularity is sufficient
for PMP as well?
—
Reply to this email directly, view it on GitHub
<#588 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHPXVJVEBLRUSKSSX5VG2FT2IJGBPAVCNFSM6AAAAABUND3XYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRWGIZDGNJTGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@allenjbaum The sail model has a flag ( |
That's what I though, which begs the question as to why Imperas DV failed
the PMP test.
It could be for a known reason (fence.i is not executed prior to executing
a write into the instruction stream)
…On Tue, Dec 31, 2024 at 1:28 AM Jordan Carlin ***@***.***> wrote:
@allenjbaum <https://github.com/allenjbaum> The sail model has a flag (
--pmp-grain) that configures the pmp granularity.
—
Reply to this email directly, view it on GitHub
<#588 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHPXVJQNSIX4CMJNHH7BJYD2IJPU7AVCNFSM6AAAAABUND3XYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRWGI4DANZYGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
ImperasDV failed all of the RWX tests because the tests don’t have fence.i. Umer says this is a known issue being fixed.
… On Dec 31, 2024, at 1:40 AM, Allen Baum ***@***.***> wrote:
That's what I though, which begs the question as to why Imperas DV failed
the PMP test.
It could be for a known reason (fence.i is not executed prior to executing
a write into the instruction stream)
On Tue, Dec 31, 2024 at 1:28 AM Jordan Carlin ***@***.***>
wrote:
> @allenjbaum <https://github.com/allenjbaum> The sail model has a flag (
> --pmp-grain) that configures the pmp granularity.
>
> —
> Reply to this email directly, view it on GitHub
> <#588 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHPXVJQNSIX4CMJNHH7BJYD2IJPU7AVCNFSM6AAAAABUND3XYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRWGI4DANZYGI>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub <#588 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AR4AA32Z4237LILPDKDUUST2IJRBLAVCNFSM6AAAAABUND3XYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRWGI4DSNRXHE>.
You are receiving this because you were mentioned.
|
yea, I pointed those out several weeks ago
On Thu, Jan 2, 2025 at 7:40 PM David Harris ***@***.***>
wrote:
… ImperasDV failed all of the RWX tests because the tests don’t have
fence.i. Umer says this is a known issue being fixed.
> On Dec 31, 2024, at 1:40 AM, Allen Baum ***@***.***> wrote:
>
>
> That's what I though, which begs the question as to why Imperas DV
failed
> the PMP test.
> It could be for a known reason (fence.i is not executed prior to
executing
> a write into the instruction stream)
>
> On Tue, Dec 31, 2024 at 1:28 AM Jordan Carlin ***@***.***>
> wrote:
>
> > @allenjbaum <https://github.com/allenjbaum> The sail model has a flag
(
> > --pmp-grain) that configures the pmp granularity.
> >
> > —
> > Reply to this email directly, view it on GitHub
> > <
#588 (comment)>,
> > or unsubscribe
> > <
https://github.com/notifications/unsubscribe-auth/AHPXVJQNSIX4CMJNHH7BJYD2IJPU7AVCNFSM6AAAAABUND3XYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRWGI4DANZYGI>
> > .
> > You are receiving this because you were mentioned.Message ID:
> > ***@***.***>
> >
> —
> Reply to this email directly, view it on GitHub <
#588 (comment)>,
or unsubscribe <
https://github.com/notifications/unsubscribe-auth/AR4AA32Z4237LILPDKDUUST2IJRBLAVCNFSM6AAAAABUND3XYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRWGI4DSNRXHE>.
> You are receiving this because you were mentioned.
>
—
Reply to this email directly, view it on GitHub
<#588 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHPXVJWP3FDPNO2UKDGBAVL2IYBBDAVCNFSM6AAAAABUND3XYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRYGY2TKMZZGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
In at least pmp64-NAPOT-RWX.S and pmp64-TOR-RWX.S, I had to add a fence.i before the jal in VERIFICATION_RWX to get the tests working. The store changes the instruction to a NOP, and the fence is necessary to fetch the correct instruction.
I see that pmp64-NA4-RWX.S has the same structure, and so do the pmp32 tests. I suspect there might be something wrong with the signature generation such that no errors are flagged even without fence.i.
VERIFICATION_RWX also has several comments about Load Data that actually should be Store data.
The text was updated successfully, but these errors were encountered: