coreboot: check Cr50 PM mode on normal boot
commite0f340054761086e4c329a2f66bb8f5b6e13d7c9
authorKeith Short <keithshort@chromium.org>
Tue, 5 Feb 2019 23:15:10 +0000 (5 16:15 -0700)
committerPatrick Georgi <pgeorgi@google.com>
Wed, 13 Feb 2019 13:03:33 +0000 (13 13:03 +0000)
tree977ba95155edd474d6d67c4bf61f58ee869c094f
parent91be00ef1be29e6670599aa5e9c297854a928d07
coreboot: check Cr50 PM mode on normal boot

Under some scenarios the key ladder on the Cr50 can get disabled.  If
this state is detected, trigger a reboot of the Cr50 to restore full
TPM functionality.

BUG=b:121463033
BRANCH=none
TEST=Built coreboot on sarien and grunt platforms.
TEST=Ran 'gsctool -a -m disable' and reboot. Verified coreboot sends
VENDOR_CC_IMMEDIATE_RESET command to Cr50 and that the Cr50 resets and
then the platform boots normally.
TEST=Performed Cr50 rollback to 0.0.22 which does not support the
VENDOR_CC_TPM_MODE command, confirmed that platform boots normally and
the coreboot log captures the unsupported command.
Tested-by: Keith Short <keithshort@chromium.org>
Change-Id: I70e012efaf1079d43890e909bc6b5015bef6835a
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31260
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
src/include/elog.h
src/mainboard/google/sarien/chromeos.c
src/security/tpm/tss/tcg-2.0/tss_marshaling.c
src/security/tpm/tss/tcg-2.0/tss_structures.h
src/security/tpm/tss/vendor/cr50/cr50.c
src/security/tpm/tss/vendor/cr50/cr50.h
src/security/tpm/tss_errors.h
src/vendorcode/google/chromeos/chromeos.h
src/vendorcode/google/chromeos/cr50_enable_update.c