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

🐛 [PMP] rework and fixes #365

Merged
merged 14 commits into from
Jul 14, 2022
Merged

🐛 [PMP] rework and fixes #365

merged 14 commits into from
Jul 14, 2022

Conversation

stnolting
Copy link
Owner

@stnolting stnolting commented Jul 13, 2022

This PR reworks/fixes the processor's physical memory protection (PMP):

  • ✔️ the PMP mechanism is completely reworked (because of a misunderstanding on my side): "In general, the PMP can grant permissions to U mode, which by default have none, and can revoke permissions from M-mode, which by default has full permissions." - RISC-V spec.; the PMP now complies to these specs.
  • ✨ added mstatus.PMP flag: when set M-mode software uses the privilege from mstatus.MPP for load/store accesses (to emulate unprivileged accesses)
  • ✨ removed pmp_num_regions_critical_c configuration constant; load/store memory access latency is nof affected by the PMP - regardless of the number of implemented PMP regions
  • ⚠️ the NEOR32 PMP still only supports TOR (top of region; bound and base concept) and OFF modes; NAPOT and NA4 are not supported (yet)

@stnolting stnolting added risc-v compliance Modification to comply with official RISC-V specs. HW hardware-related labels Jul 13, 2022
@stnolting stnolting self-assigned this Jul 13, 2022
@stnolting stnolting marked this pull request as ready for review July 13, 2022 19:13
@stnolting stnolting added the bug Something isn't working label Jul 13, 2022
@stnolting stnolting changed the title [PMP] rework and fixes 🐛 [PMP] rework and fixes Jul 13, 2022
@stnolting stnolting merged commit 7170967 into main Jul 14, 2022
@stnolting stnolting deleted the rework_fix_pmp branch July 14, 2022 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working HW hardware-related risc-v compliance Modification to comply with official RISC-V specs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant