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

🐛 fix atomic write/clear/set accesses of clear-only CSR bits #829

Merged
merged 6 commits into from Feb 24, 2024

Conversation

stnolting
Copy link
Owner

@stnolting stnolting commented Feb 23, 2024

This is a rework of #821 trying to finally fix #818.

CSR bits that can change at any time and provide clear-only behavior need special handling when performing CSR write/clear/set operations. The modifications from this PR ensure that only the intended bits are touched at all.

Effected CSRs:

  • mip[.firq]
  • tdata1[.hit]

⚠️ mip is clear-only again - writing ones has no effect at all (reverting the access changes from #821).

@stnolting stnolting added bug Something isn't working HW hardware-related labels Feb 23, 2024
@stnolting stnolting self-assigned this Feb 23, 2024
@stnolting stnolting changed the title 🐛 fix MIP CSr write/clear/set accesses 🐛 fix MIP CSR write/clear/set accesses Feb 23, 2024
@stnolting stnolting changed the title 🐛 fix MIP CSR write/clear/set accesses 🐛 fix atomic write/clear/set accesses of clear-only CSR bits Feb 23, 2024
@stnolting stnolting marked this pull request as ready for review February 23, 2024 21:06
@stnolting stnolting merged commit bf246fe into main Feb 24, 2024
10 checks passed
@stnolting stnolting deleted the fix_atomic_csr_clearing branch February 24, 2024 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working HW hardware-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible issue with FIRQ pending interrupt clearing
1 participant