Skip to content

rtl: el2_dec_pmp_ctl: Prevent using shared regions, while MML is unset - #522

Closed
MateuszKarlic wants to merge 1 commit into
chipsalliance:mainfrom
antmicro:102146_fix-mml-on-reserved-regions
Closed

rtl: el2_dec_pmp_ctl: Prevent using shared regions, while MML is unset#522
MateuszKarlic wants to merge 1 commit into
chipsalliance:mainfrom
antmicro:102146_fix-mml-on-reserved-regions

Conversation

@MateuszKarlic

Copy link
Copy Markdown
Contributor

The rationale behind this change, is that the RISC-V specification, explicitly marks the regions with the attributes R=0, W=1, as reserved, even if SMEPMP extension is implemented, as long as MML=0. To configure such regions, MML needs to be set. To configure Locked regions, it is possible to additionally use RLB, and reset it at the end of PMP configuration.

Since PMP registers are WARL (Write Any, Read Legal), if the config is reserved, it should not be read - so we clear the reserved bits.

The rationale behind this change, is that the RISC-V specification,
explicitly marks the regions with the attributes R=0, W=1, as reserved,
even if SMEPMP extension is implemented, as long as MML=0. To configure
such regions, MML needs to be set. To configure Locked regions, it is
possible to additionally use RLB, and reset it at the end of PMP
configuration.
Since PMP registers are WARL (Write Any, Read Legal), if the config is
reserved, it should not be read - so we clear the reserved bits.

Signed-off-by: Mateusz Karlic <mkarlic@antmicro.com>
@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 4, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: MateuszKarlic / name: Mateusz Karlic (38dc0b6)

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Coverage dashboard artifact for this PR is available in the CI run

@tmichalak

Copy link
Copy Markdown
Collaborator

Superseded by #527. Closing.

@tmichalak tmichalak closed this Aug 10, 2026
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.

2 participants