Skip to content
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

Make env CLIC-compatible #291

Closed
wants to merge 1 commit into from
Closed

Conversation

marcfedorow
Copy link
Contributor

Fixes #285

Copy link
Collaborator

@allenjbaum allenjbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First: this is being completely superseded by a new version of arch-test.h (PR267, RealSoonNow)
What this is doing is taking original value of xTVEC and clearing the low 6 bits.
That means when we return from the test with all CSRs restored to their original value - this one has been destroyed. So, not acceptable.

Secondly, you're using this to force some particular behavior (clic behavior, I assume) regardless of whether clic is implemented or not. Also not acceptable.
We can enforce that trampolines be at 64b boundaries - I'll update PR267 to do that.

Third: you're clearing the upper 12 bits of the mcause register, which (among other things) destroys the bit that indicates where this was an interrupt or an exception. Obviously not acceptable.

Please close this and wait until PR267 is merged, then try again - but any change you make must be completey compatible with non-clic systems.

@marcfedorow
Copy link
Contributor Author

marcfedorow commented Nov 1, 2022

you're using this to force some particular behavior (clic behavior, I assume)

Definitely not. IDK how this follows from my patch. Clearing some bits before writing them to signature will not definitely break anything (except actually clearing the meaningful bits of addres, and that is workaronded with the proper alignment).

Using masks instead of shifts is not that hard I suppose, so this PR is easily fixable.

@marcfedorow marcfedorow closed this Nov 1, 2022
@allenjbaum
Copy link
Collaborator

allenjbaum commented Nov 1, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLIC or vectored mode leads to misaligned load
2 participants