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

RISC-V: General PMP Improvements #1821

Merged
merged 2 commits into from May 8, 2020
Merged

RISC-V: General PMP Improvements #1821

merged 2 commits into from May 8, 2020

Conversation

alistair23
Copy link
Contributor

Pull Request Overview

This PR reduces the number of instructions to enable/disable the PMP. It does this by looping over less registers when disabling PMP and by consolidating the read/write instructions to a single operation.

Testing Strategy

Tested by running Tock on QEMU for OpenTitan and HiFive1.

TODO or Help Wanted

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make formatall.

Currently when disabling the PMP we zero out all 16 cfg registers. Let's
just zero out the ones we are actually using for the chip to save
cycles.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Instead of setting the pmpcfg registers in four read/writes just do it
in a single one.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
@alistair23 alistair23 mentioned this pull request May 4, 2020
2 tasks
@alistair23 alistair23 added the WG-OpenTitan In the purview of the OpenTitan working group. label May 4, 2020
@alistair23 alistair23 requested a review from bradjc May 4, 2020 17:18
@bradjc bradjc added the last-call Final review period for a pull request. label May 7, 2020
@bradjc
Copy link
Contributor

bradjc commented May 8, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented May 8, 2020

@bors bors bot merged commit cec48b8 into tock:master May 8, 2020
@alistair23 alistair23 deleted the alistair/pmp branch May 18, 2020 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
last-call Final review period for a pull request. WG-OpenTitan In the purview of the OpenTitan working group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants