Skip to content

Conversation

fsammoura1980
Copy link
Contributor

Introduce z_riscv_pmp_write_config to abstract writing to pmpcfg registers. This function handles the differing register layouts and slot counts between RV32 and RV64 architectures, writing to the appropriate pmpcfg0, pmpcfg1, pmpcfg2, or pmpcfg3 CSRs as needed based on CONFIG_PMP_SLOTS.

Introduce `z_riscv_pmp_write_config` to abstract writing to pmpcfg
registers. This function handles the differing register layouts and slot
counts between RV32 and RV64 architectures, writing to the appropriate
pmpcfg0, pmpcfg1, pmpcfg2, or pmpcfg3 CSRs as needed based on
CONFIG_PMP_SLOTS.

Signed-off-by: Firas Sammoura <[email protected]>
Copy link

@fsammoura1980
Copy link
Contributor Author

merging this PR will simplify how we implement #97310

Copy link
Member

@fkokosinski fkokosinski left a comment

Choose a reason for hiding this comment

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

This is good stuff, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: RISCV RISCV Architecture (32-bit & 64-bit)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants