-
Notifications
You must be signed in to change notification settings - Fork 13
ot_spi_device: Implement the TPM mode
#249
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
Conversation
2ed5386 to
aa2670c
Compare
8ba3a5c to
8cc7204
Compare
|
I'll review it soon; I've noticed there are a couple of type mismatches (e.g. |
|
see also the PR title, as they now follow the formatting, i.e. |
AlexJones0
left a comment
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.
I got part way through reviewing but then @engdoreis told me this is still being actively worked on as a draft. I'll leave the comments I had for now though to aid development, but I haven't looked at any of the TPM logic itself yet.
8675744 to
aa54714
Compare
rivos-eblot
left a comment
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.
Note: I would recommend to add new trace_ot_spi_device_...
Traces are very useful for debugging the emulation itself, but they are also very useful when developping guest SW (RISC-V code) and remote host peer SW. Thanks.
1169704 to
c930153
Compare
rivos-eblot
left a comment
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.
Two remaining items:
- static assertion location
- emptying TPM FIFO @ reset.
nit pick: you still need to update your PR titke |
ot_spi_device: Implement the TPM mode
Based on the table in the spi_device/doc/programmers_guide Signed-off-by: Douglas Reis <[email protected]>
ba450b8 to
c7d8e5a
Compare
rivos-eblot
left a comment
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
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.
Thanks, this generally LGTM after addressing my final comments. I haven't cross-referenced the implementation against the TPM spec, but a passing TPM test provides confidence.
On that note, when I checkout your OpenTitan PR and run the provided command the test does not pass, it just gets stuck after Nevermind, I didn't realize that my override path was different. It works when I override QEMU properly 😅 I'm happy after these 2 comments are addressed.Iteration 0 and times out. Is there something I'm missing, was there a regression while making the fixes or is there something else happening?
Signed-off-by: Douglas Reis <[email protected]>
|
See SPI device regression introduced with this PR: #266 |
ThIs PR does not cover all the TPM implementation, the HW registers will be covered by a follow up PR.
To test use the Opentitan PR lowRISC/opentitan#28542 and run: