-
Notifications
You must be signed in to change notification settings - Fork 745
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
[otbn,doc] Document the bus-accessible part of DMEM #8890
Conversation
I really dislike the "lower" vs "upper" naming, as it always confuses me: when I think of a memory layout, I start at the top with address 0, and it then grows downwards. So the "upper half" is address 0 to 2k-1 for me, and the "lower half" is address 2k to 4k-1. I'd just make it explicit which addresses we mean. Felix, Chris: Can you have a look? This feature is intended to give OTBN software a scratchpad/private memory, which cannot easily be read out from the bus. Intermediate values, keys, etc. should be stored there to give them a bit of additional protection from read-out attacks. |
@imphil: I'd forgotten you disliked that terminology. Sorry! Will re-word (and similarly in the tooling / DV patches I've just pushed). |
886e8f6
to
d9c832c
Compare
Done. Honestly, I think it's more clunky, but apparently not everyone has the same mental model of memory as me :-) |
d9c832c
to
8919391
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM apart from the remaining "upper" if that wasn't intended.
Out of curiosity: Would other window sizes be possible via a design parameter?
hw/ip/otbn/doc/_index.md
Outdated
@@ -500,6 +500,9 @@ These accesses are ignored if OTBN is busy. | |||
A host processor can check whether OTBN is busy by reading the {{< regref "STATUS">}} register. | |||
All memory accesses through the register interface must be word-aligned 32b word accesses. | |||
|
|||
While DMEM is 4kiB, only first 2kiB (at addresses `0x0` to `0x7ff`) is visible through the register interface. | |||
This is to allow OTBN applications to store sensitive information in the upper half, making it harder for that information to leak back to Ibex. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you miss the "upper" here when switching to the first/second terminology.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gah! Yes, I did: thanks. For other window sizes: we could do that easily enough. The only awkward bit is that there are some (rather stupid) bits of tooling that would need to know both sizes: at the moment, my pending patches hardwire the "divide by 2" but there's no real reason we couldn't do better.
218b252
to
6cd0338
Compare
This doesn't yet change the implementation, nor does it change DV or tooling code. Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
6cd0338
to
a8e595c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Post-merge (sorry for delay in looking at this, I somehow didn't realize it was doc-only) - this LGTM!
This doesn't yet change the implementation, nor does it change DV or
tooling code.
Fixes #8720.
(@GregAC, @imphil: Any ideas on other good reviewers for doc/spec changes like this once Philipp has left?)