vboot: Allow other platforms to use soft reboot workaround
Add a Kconfig value to enable other platforms to use the soft reboot workaround. TEST=Build and run on Galileo Gen2 Change-Id: I5a7ebd200229654128d367ecb50647ff69bb5258 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/18798 Tested-by: Martin Roth <martinroth@google.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
@ -142,6 +142,10 @@ config VBOOT_HAS_REC_HASH_SPACE
|
|||||||
Set this option to indicate to vboot that recovery data hash space
|
Set this option to indicate to vboot that recovery data hash space
|
||||||
is present in TPM.
|
is present in TPM.
|
||||||
|
|
||||||
|
config VBOOT_SOFT_REBOOT_WORKAROUND
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
|
||||||
config VBOOT
|
config VBOOT
|
||||||
bool "Verify firmware with vboot."
|
bool "Verify firmware with vboot."
|
||||||
default n
|
default n
|
||||||
|
@ -424,23 +424,22 @@ uint32_t setup_tpm(struct vb2_context *ctx)
|
|||||||
return TPM_SUCCESS;
|
return TPM_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEGRA_SOFT_REBOOT_WORKAROUND
|
if (IS_ENABLED(CONFIG_VBOOT_SOFT_REBOOT_WORKAROUND)) {
|
||||||
result = tlcl_startup();
|
result = tlcl_startup();
|
||||||
if (result == TPM_E_INVALID_POSTINIT) {
|
if (result == TPM_E_INVALID_POSTINIT) {
|
||||||
/*
|
/*
|
||||||
* Some prototype hardware doesn't reset the TPM on a CPU
|
* Some prototype hardware doesn't reset the TPM on a CPU
|
||||||
* reset. We do a hard reset to get around this.
|
* reset. We do a hard reset to get around this.
|
||||||
*/
|
*/
|
||||||
VBDEBUG("TPM: soft reset detected\n", result);
|
VBDEBUG("TPM: soft reset detected\n");
|
||||||
ctx->flags |= VB2_CONTEXT_SECDATA_WANTS_REBOOT;
|
ctx->flags |= VB2_CONTEXT_SECDATA_WANTS_REBOOT;
|
||||||
return TPM_E_MUST_REBOOT;
|
return TPM_E_MUST_REBOOT;
|
||||||
} else if (result != TPM_SUCCESS) {
|
} else if (result != TPM_SUCCESS) {
|
||||||
VBDEBUG("TPM: tlcl_startup returned %08x\n", result);
|
VBDEBUG("TPM: tlcl_startup returned %08x\n", result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#else
|
} else
|
||||||
RETURN_ON_FAILURE(tlcl_startup());
|
RETURN_ON_FAILURE(tlcl_startup());
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some TPMs start the self test automatically at power on. In that case
|
* Some TPMs start the self test automatically at power on. In that case
|
||||||
|
Reference in New Issue
Block a user