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

Smstateen: Ignore writes to read-only hstateen*[n] bits when mstateen*[n]=0 #1648

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

YenHaoChen
Copy link
Contributor

@YenHaoChen YenHaoChen commented Apr 23, 2024

The specification states that writes to read-only bits in a RW CSR are ignored.
image

The hstateen*[n] bits are read-only when mstateen*[n]=0.
image

This PR propose ignoring writes to read-only hstateen*[n] bits when mstateen*[n]=0 instead of writing the bits to 0.

…*[n]=0

The specification states that writes to read-only bits in a RW CSR are
ignored. The hstateen*[n] bits are read-only when mstateen*[n]=0. This
PR proposes ignoring writes to read-only hstateen*[n] bits when
mstateen*[n]=0 instead of writing the bits to 0.
Copy link
Collaborator

@jerryz123 jerryz123 left a comment

Choose a reason for hiding this comment

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

This looks correct to me

@aswaterman aswaterman merged commit d39cbb3 into riscv-software-src:master Apr 29, 2024
3 checks passed
@YenHaoChen YenHaoChen deleted the pr-hstateen branch April 29, 2024 23:56
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.

None yet

3 participants