Conversation
this introduces a hierarchical approach to the masking of the lower priv level status views
eyck
requested changes
Dec 14, 2025
Contributor
There was a problem hiding this comment.
I think the include mechanism is suboptimal as it increases the compile times and introduces wrong dependencies.
Why not move the get_mstatus_mask() functions as get_mstatus_m_mask()/get_mstatus_mu_mask()/get_mstatus_msu_mask() into riscv_common.h?
This would remove the need of riscv_hart_m_p.h being included in riscv_hart_mu_p.h which in turn is included in riscv_hart_msu_vp.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces the handling of the VS and FS field, at least from the privilege wrapper side.
This means that if the F or V extension are present, the corresponding mstatus (and lower level views) bits can be set and read.
In the same scope the handling of reading ustatus and sstatus were refactored to represent a more hierarchical approach. The functionality of the mu wrapper now builds on the m wrapper.