Skip to content

Conversation

@EAlexJ
Copy link
Contributor

@EAlexJ EAlexJ commented Dec 14, 2025

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.

this introduces a hierarchical approach to the masking of the lower priv level status views
@EAlexJ EAlexJ requested a review from eyck December 14, 2025 14:35
Copy link
Contributor

@eyck eyck left a comment

Choose a reason for hiding this comment

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

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

@eyck eyck merged commit e74b87f into develop Dec 16, 2025
4 checks passed
@eyck eyck deleted the feature/better_mstatus branch December 16, 2025 12:25
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