OpenTitan: Flash fixes#2765
Merged
Merged
Conversation
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>
bradjc
approved these changes
Aug 13, 2021
| if self | ||
| .flash | ||
| .write_page((0x20040000 + address) / 64, data_buf) | ||
| .write_page((0x20060000 + address) / 64, data_buf) |
Contributor
There was a problem hiding this comment.
I know this isn't relevant to this PR, but why does the tickv capsule have a hardcoded address?
Contributor
Author
There was a problem hiding this comment.
Yeah, it needs to be removed. I only just noticed it as well. That should be a separate PR though
hudson-ayers
approved these changes
Aug 16, 2021
hudson-ayers
left a comment
Contributor
There was a problem hiding this comment.
Good that this fixes the tests for now, but I assume some of the changes in the lowrisc/ folder are different than what you would want if you had actual hardware instead of this FPGA board?
Contributor
|
bors r+ |
Contributor
sirchnik
pushed a commit
to sirchnik/tock
that referenced
this pull request
May 12, 2026
2765: OpenTitan: Flash fixes r=bradjc a=alistair23 ### Pull Request Overview There was a bug in the OpenTitan flash controller where the app flash at and above 0x2004_0000 was erased (set to all 1s). The problem is that this was really hard to fix. It turns out that the flash on the Nexys Video FPGA board is cut in half (lowRISC/opentitan#7730) so the address would wrap around. This PR fixes the flash controller to not access the high addresses of flash to avoid the wrap around issue in hardware. This fixes all OT release tests. ### Testing Strategy Run the release tests and kernel unit tests. ### TODO or Help Wanted ### Documentation Updated - [X] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [X] Ran `make prepush`. Co-authored-by: Alistair Francis <alistair.francis@wdc.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Overview
There was a bug in the OpenTitan flash controller where the app flash at and above 0x2004_0000 was erased (set to all 1s).
The problem is that this was really hard to fix.
It turns out that the flash on the Nexys Video FPGA board is cut in half (lowRISC/opentitan#7730) so the address would wrap around.
This PR fixes the flash controller to not access the high addresses of flash to avoid the wrap around issue in hardware. This fixes all OT release tests.
Testing Strategy
Run the release tests and kernel unit tests.
TODO or Help Wanted
Documentation Updated
/docs, or no updates are required.Formatting
make prepush.