Refactor and Update the tcti-x-helper#2899
Draft
wxleong wants to merge 1 commit into
Draft
Conversation
wxleong
force-pushed
the
fix-tcti-helper
branch
7 times, most recently
from
October 1, 2024 01:18
6a34882 to
96e137c
Compare
wxleong
force-pushed
the
fix-tcti-helper
branch
3 times, most recently
from
October 4, 2024 02:04
4f76b2c to
9682496
Compare
- Moved common transmit/receive FIFO protocol code to tcti-helper-common. - Refined the FIFO protocol implementation. - Updated unit test implementation so that changes to the FIFO protocol no longer require modifications to all dependent unit tests. Signed-off-by: wenxin.leong <wenxin.leong@infineon.com>
wxleong
force-pushed
the
fix-tcti-helper
branch
from
October 7, 2024 05:00
9682496 to
f170d3b
Compare
| LOG_ERROR ("Failed to send the command"); | ||
| return rc; | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
Here we should check for STS_VALID | EXPECT, not ?
| LOG_ERROR ("Failed to send the command"); | ||
| return rc; | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
Here we should again check for STS_VALID | EXPECT
| } | ||
|
|
||
| /* Await TPM readiness */ | ||
| expected_status_bits = TCTI_HELPER_COMMON_TPM_STS_VALID | TCTI_HELPER_COMMON_TPM_STS_DATA_EXPECT; |
Member
There was a problem hiding this comment.
Here, the expected status should be STS_VALID | !EXPECT
I wonder why this still works ?
| return TSS2_RC_SUCCESS; | ||
| } | ||
|
|
||
| TSS2_RC Tcti_Helper_Common_Transmit (TCTI_HELPER_COMMON_CONTEXT *ctx, size_t size, const uint8_t *cmd_buf) |
Member
There was a problem hiding this comment.
We are missing the retry-logic in this function.
It always goes directly to "return error"
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.
Resolves #2891, resolves #2620