-
Notifications
You must be signed in to change notification settings - Fork 365
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
Refactor and Update the tcti-x-helper #2899
base: master
Are you sure you want to change the base?
Conversation
6a34882
to
96e137c
Compare
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 <[email protected]>
9682496
to
f170d3b
Compare
LOG_ERROR ("Failed to send the command"); | ||
return rc; | ||
} | ||
|
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.
Here we should check for STS_VALID | EXPECT
, not ?
LOG_ERROR ("Failed to send the command"); | ||
return rc; | ||
} | ||
|
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.
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; |
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.
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) |
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.
We are missing the retry-logic in this function.
It always goes directly to "return error"
Resolves #2891, resolves #2620