summaryrefslogtreecommitdiff
path: root/src/security/tpm/tss/tcg-1.2
diff options
context:
space:
mode:
authorJon Murphy <jpmurphy@google.com>2023-09-05 10:44:09 -0600
committerFelix Held <felix-coreboot@felixheld.de>2023-09-25 14:05:36 +0000
commit056952ef14bdc542e0ebfef48aa09f126754d3aa (patch)
treea744ea3c2400ed7b65c35e7d3a5fbe02512d3933 /src/security/tpm/tss/tcg-1.2
parent3e4f586ec07b6e5e908c66088b5765f762aa86fe (diff)
treewide: Adopt TCG standard naming
Adopt TCG standard naming and definitions for TPM Return codes. BUG=b:296439237 TEST=Build and boot to OS on skyrim BRANCH=None Change-Id: I60755723262ec205a4c134948b0250aac4974d35 Signed-off-by: Jon Murphy <jpmurphy@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77665 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/security/tpm/tss/tcg-1.2')
-rw-r--r--src/security/tpm/tss/tcg-1.2/tss.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/security/tpm/tss/tcg-1.2/tss.c b/src/security/tpm/tss/tcg-1.2/tss.c
index 9c19f7f3cb..b6527a6482 100644
--- a/src/security/tpm/tss/tcg-1.2/tss.c
+++ b/src/security/tpm/tss/tcg-1.2/tss.c
@@ -108,7 +108,7 @@ uint32_t tlcl_send_receive(const uint8_t *request, uint8_t *response,
max_length);
/* If the command fails because the self test has not completed, try it
* again after attempting to ensure that the self test has completed. */
- if (rc == TPM_E_NEEDS_SELFTEST || rc == TPM_E_DOING_SELFTEST) {
+ if (rc == TPM_NEEDS_SELFTEST || rc == TPM_DOING_SELFTEST) {
rc = tlcl_continue_self_test();
if (rc != TPM_SUCCESS)
return rc;
@@ -125,7 +125,7 @@ uint32_t tlcl_send_receive(const uint8_t *request, uint8_t *response,
do {
rc = tlcl_send_receive_no_retry(request, response,
max_length);
- } while (rc == TPM_E_DOING_SELFTEST);
+ } while (rc == TPM_DOING_SELFTEST);
#endif
}
return rc;
@@ -238,7 +238,7 @@ uint32_t tlcl_read(uint32_t index, void *data, uint32_t length)
uint8_t *nv_read_cursor = response + kTpmResponseHeaderLength;
from_tpm_uint32(nv_read_cursor, &result_length);
if (result_length > length)
- return TPM_E_IOERROR;
+ return TPM_IOERROR;
nv_read_cursor += sizeof(uint32_t);
memcpy(data, nv_read_cursor, result_length);
}
@@ -301,7 +301,7 @@ uint32_t tlcl_get_permanent_flags(TPM_PERMANENT_FLAGS *pflags)
return rc;
from_tpm_uint32(response + kTpmResponseHeaderLength, &size);
if (size != sizeof(TPM_PERMANENT_FLAGS))
- return TPM_E_IOERROR;
+ return TPM_IOERROR;
memcpy(pflags, response + kTpmResponseHeaderLength + sizeof(size),
sizeof(TPM_PERMANENT_FLAGS));
return rc;
@@ -338,7 +338,7 @@ uint32_t tlcl_extend(int pcr_num, const uint8_t *digest_data,
uint8_t response[kTpmResponseHeaderLength + kPcrDigestLength];
if (digest_algo != VB2_HASH_SHA1)
- return TPM_E_INVALID_ARG;
+ return TPM_CB_INVALID_ARG;
memcpy(&cmd, &tpm_extend_cmd, sizeof(cmd));
to_tpm_uint32(cmd.buffer + tpm_extend_cmd.pcrNum, pcr_num);