diff options
author | Jon Murphy <jpmurphy@google.com> | 2023-09-05 11:36:43 -0600 |
---|---|---|
committer | Raul Rangel <rrangel@chromium.org> | 2023-09-28 16:54:37 +0000 |
commit | d7b8dc9cf5978809912dcffefce2eda5937c9653 (patch) | |
tree | 56befbc9563ce2baca6f31ccbfb041e99fb858d6 /src/security/tpm/tis.h | |
parent | 53fc667943052bd592b8406bdf4bf652c6c9cd3a (diff) |
treewide: convert to tpm_result_t
Convert TPM functions to return TPM error codes(referred to as
tpm_result_t) values to match the TCG standard.
BUG=b:296439237
TEST=build and boot to Skyrim
BRANCH=None
Change-Id: Ifdf9ff6c2a1f9b938dbb04d245799391115eb6b1
Signed-off-by: Jon Murphy <jpmurphy@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77666
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/security/tpm/tis.h')
-rw-r--r-- | src/security/tpm/tis.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/security/tpm/tis.h b/src/security/tpm/tis.h index fae049efff..34dc8e8bd7 100644 --- a/src/security/tpm/tis.h +++ b/src/security/tpm/tis.h @@ -3,6 +3,7 @@ #ifndef TIS_H_ #define TIS_H_ +#include <security/tpm/tss_errors.h> #include <types.h> enum tis_access { @@ -34,19 +35,19 @@ enum tis_status { /* * tis_init() * - * Initialize the TPM device. Returns 0 on success or -1 on - * failure (in case device probing did not succeed). + * Initialize the TPM device. + * Returns TSS Return Code from TCG TPM Structures. See tss_errors.h */ -int tis_init(void); +tpm_result_t tis_init(void); /* * tis_open() * * Requests access to locality 0 for the caller. * - * Returns 0 on success, -1 on failure. + * Returns TSS Return Code from TCG TPM Structures. See tss_errors.h */ -int tis_open(void); +tpm_result_t tis_open(void); /* * tis_sendrecv() @@ -58,10 +59,9 @@ int tis_open(void); * @recvbuf - memory to save the response to * @recv_len - pointer to the size of the response buffer * - * Returns 0 on success (and places the number of response bytes at recv_len) - * or -1 on failure. + * Returns TSS Return Code from TCG TPM Structures. See tss_errors.h */ -int tis_sendrecv(const u8 *sendbuf, size_t send_size, u8 *recvbuf, +tpm_result_t tis_sendrecv(const u8 *sendbuf, size_t send_size, u8 *recvbuf, size_t *recv_len); /* |