8000 OpenTitan: Prepare to bump to the latest RTL SHA by alistair23 · Pull Request #3205 · tock/tock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

OpenTitan: Prepare to bump to the latest RTL SHA #3205

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

Merged
merged 8 commits into from
Sep 12, 2022

Conversation

alistair23
Copy link
Contributor
@alistair23 alistair23 commented Sep 9, 2022

Pull Request Overview

This is just the first few commits of #3056, focusing on the ePMP improvements to handle already configured ePMP regions.

See each commit for details

Testing Strategy

Tested as part of #3056

TODO or Help Wanted

Documentation Updated

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

Formatting

  • Ran make prepush.

We currently support detecting any number of ePMP regions by writing
values and seeing if the new value sticks. This allows us to support
multiple platforms, but it doesn't work if the bootloader has already
enabled MML.

This patch changes the behaviour if MML has been set, so that we ensure
we won't accidently lock ourselves out.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
A previous boot stage has enabled Machine Mode Whitelist Policy
(mseccfg.MMWP), which we can't disable. That means that Tock will
be denied a memory access if it doesn't match a PMP region
This eventually won't matter, as Tock configures it's own regions,
but it makes it difficult to setup.

To allow us to setup the ePMP regions without locking ourselves out
we create two special regions.

We create an allow all region as the first and last region.
This way no matter what the previous stage did, we should have a
working fallback while we modify the rules.
If the previous stage has an allow all in the first or last region,
we won't get locked out. If the previous stage created a range of
regions we also won't get locked out.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
@github-actions github-actions bot added risc-v RISC-V architecture WG-OpenTitan In the purview of the OpenTitan working group. labels Sep 9, 2022
@bradjc
Copy link
Contributor
bradjc commented Sep 12, 2022

bors r+

@bors
Copy link
Contributor
bors bot commented Sep 12, 2022

@bors bors bot merged commit f3cc2fa into tock:master Sep 12, 2022
@alistair23 alistair23 deleted the alistair/ot-bump-pre branch September 12, 2022 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
risc-v RISC-V architecture WG-OpenTitan In the purview of the OpenTitan working group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0