diff options
Diffstat (limited to 'src/security/tpm/tspi')
-rw-r--r-- | src/security/tpm/tspi/tspi.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/security/tpm/tspi/tspi.c b/src/security/tpm/tspi/tspi.c index 22383d4027..aee1cf4709 100644 --- a/src/security/tpm/tspi/tspi.c +++ b/src/security/tpm/tspi/tspi.c @@ -45,7 +45,7 @@ static uint32_t tpm1_invoke_state_machine(void) } deactivated = !deactivated; - rc = TPM_E_MUST_REBOOT; + rc = TPM_CB_MUST_REBOOT; } return rc; @@ -61,7 +61,7 @@ static uint32_t tpm_setup_s3_helper(void) case TPM_SUCCESS: break; - case TPM_E_INVALID_POSTINIT: + case TPM_INVALID_POSTINIT: /* * We're on a platform where the TPM maintains power * in S3, so it's already initialized. @@ -151,7 +151,7 @@ uint32_t tpm_setup(int s3flag) rc = tlcl_startup(); if (CONFIG(TPM_STARTUP_IGNORE_POSTINIT) - && rc == TPM_E_INVALID_POSTINIT) { + && rc == TPM_INVALID_POSTINIT) { printk(BIOS_DEBUG, "TPM: ignoring invalid POSTINIT\n"); rc = TPM_SUCCESS; } @@ -224,7 +224,7 @@ uint32_t tpm_extend_pcr(int pcr, enum vb2_hash_algorithm digest_algo, uint32_t rc; if (!digest) - return TPM_E_IOERROR; + return TPM_IOERROR; if (tspi_tpm_is_setup()) { rc = tlcl_lib_init(); @@ -262,14 +262,14 @@ uint32_t tpm_measure_region(const struct region_device *rdev, uint8_t pcr, struct vb2_digest_context ctx; if (!rdev || !rname) - return TPM_E_INVALID_ARG; + return TPM_CB_INVALID_ARG; digest_len = vb2_digest_size(TPM_MEASURE_ALGO); assert(digest_len <= sizeof(digest)); if (vb2_digest_init(&ctx, vboot_hwcrypto_allowed(), TPM_MEASURE_ALGO, region_device_sz(rdev))) { printk(BIOS_ERR, "TPM: Error initializing hash.\n"); - return TPM_E_HASH_ERROR; + return TPM_CB_HASH_ERROR; } /* * Though one can mmap the full needed region on x86 this is not the @@ -281,16 +281,16 @@ uint32_t tpm_measure_region(const struct region_device *rdev, uint8_t pcr, if (rdev_readat(rdev, buf, offset, len) < 0) { printk(BIOS_ERR, "TPM: Not able to read region %s.\n", rname); - return TPM_E_READ_FAILURE; + return TPM_CB_READ_FAILURE; } if (vb2_digest_extend(&ctx, buf, len)) { printk(BIOS_ERR, "TPM: Error extending hash.\n"); - return TPM_E_HASH_ERROR; + return TPM_CB_HASH_ERROR; } } if (vb2_digest_finalize(&ctx, digest, digest_len)) { printk(BIOS_ERR, "TPM: Error finalizing hash.\n"); - return TPM_E_HASH_ERROR; + return TPM_CB_HASH_ERROR; } return tpm_extend_pcr(pcr, TPM_MEASURE_ALGO, digest, digest_len, rname); } |