Skip to content

Fix mstatus fs/vs field descriptions #725

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

Merged
merged 1 commit into from
May 6, 2025

Conversation

jordancarlin
Copy link
Contributor

The existing description said

This parameter only has an effect when both S and F mode are disabled.

This is incorrect. The field has an effect when F is disabled and S is enabled. We could update the description, but the preceding line makes this sentence redundant anyway, so this just removes the line instead.

The same issue applies to the "vs" field.

Copy link
Collaborator

@dhower-qc dhower-qc left a comment

Choose a reason for hiding this comment

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

While we are at it, the extra_validation should also check that mstatus.FS is read-only if neither F nor S is implemented. Something like:

  extra_validation: |
    assert MSTATUS_FS_WRITEABLE == true  if ext?(:F)
    assert MSTATUS_FS_WRITEABLE == false if (!ext?(:S) && !ext?(:F))

Same for VS.

@jordancarlin
Copy link
Contributor Author

Updated to add the new extra_validation.

The existing description said "This parameter only has an effect when both S
and F mode are disabled." This is incorrect. The field has an effect when F is
disabled and S is enabled. We could update the description, but the preceding
line makes this sentence redundant anyway, so this just removes the line instead.

The same issue applies to the "vs" field.

Also adds extra_validation to these parameters.
@ThinkOpenly ThinkOpenly added this pull request to the merge queue May 6, 2025
Merged via the queue into riscv-software-src:main with commit 9659790 May 6, 2025
11 checks passed
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.

3 participants