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

csr_regfile: Fix irq/ex delegation in RVH #2689

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

niwis
Copy link
Contributor

@niwis niwis commented Jan 8, 2025

In RVH, traps and interrupts are currently delegated if hxdeleg is set but mxdeleg is not (mxdeleg is not considered in the else-if-block condition in old line 1807), violating the spec ("A trap/irq that has been delegated to HS-mode (using mxdeleg) is further delegated to VS-mode if the corresponding hxdeleg bit is set"). Fix and simplify the corresponding logic.

@ninolomata can you confirm this?

In RVH, interrupts are currently delegated if hxdeleg is set but mxdeleg
is not, violating the spec ("A trap/irq *that has been delegated to
HS-mode (using mxdeleg)* is further delegated to VS-mode if the
corresponding hxdeleg bit is set"). Fix and simplify the corresponding logic.

Signed-off-by: Nils Wistoff <[email protected]>
Copy link
Contributor

github-actions bot commented Jan 8, 2025

✔️ successful run, report available here.

@ninolomata
Copy link
Contributor

Hi @niwis, nice catch! Yes it's correct :)

Copy link
Contributor

github-actions bot commented Jan 8, 2025

✔️ successful run, report available here.

@JeanRochCoulon JeanRochCoulon merged commit e55f25d into openhwgroup:master Jan 8, 2025
10 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