Added dedicated LSU operand registers #988
Open
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.
Based on a discussion with @Silabs-ArjanB
This PR introduces dedicated registers for LSU operands, which prevents the operands of non-LSU instructions from leaking to the data memory interface.
In the current version, internal data is always encoded as an address and forwarded, even if data_req_o is low.
A connected device that does not conform to the OBI protocol (because it's buggy or malicious) could use this covert channel to undermine security features such as data_ind_timing.
I have implemented the identical fix in my setup for cv32e40s to ensure that non-LSU operands do not leak to the data memory interface.
There may still be invalid memory requests and thus stale data, but only for LSU instructions.
Also, I have not yet considered compressed instructions.
I have not run any functional verification with this fix implemented.