diff options
author | Keith Short <keithshort@chromium.org> | 2019-01-11 07:52:32 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-01-17 13:01:52 +0000 |
commit | e371d421137901043ba495f8e4f5063be26b6764 (patch) | |
tree | bc938bc8baad7084fea948eb9c3dfdd0743d9d05 /src/security/tpm/tss/tcg-2.0 | |
parent | 49bfdb35f47bdce0b53c553b3b6fb67bcbc8796e (diff) |
src/security/tpm: query recovery mode from Cr50
On the Sarien/Arcada platforms, the EC is not trusted to provide
the state of the ESC+REFRESH+PWR recovery combination. On these
platforms the Cr50 latches the state of REFRESH+PWR for use as the
recovery mode key combination.
BUG=b:122715254
BRANCH=none
TEST=Verify recovery mode screen shown after pressing REFRESH+PWR
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Ie3ce519956f916023c8c52f1d11fa93331f52f3c
Reviewed-on: https://review.coreboot.org/c/30929
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/security/tpm/tss/tcg-2.0')
-rw-r--r-- | src/security/tpm/tss/tcg-2.0/tss_marshaling.c | 5 | ||||
-rw-r--r-- | src/security/tpm/tss/tcg-2.0/tss_structures.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/security/tpm/tss/tcg-2.0/tss_marshaling.c b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c index 49ac5e8979..d8b3097962 100644 --- a/src/security/tpm/tss/tcg-2.0/tss_marshaling.c +++ b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c @@ -273,6 +273,9 @@ static int marshal_cr50_vendor_command(struct obuf *ob, void *command_body) rc |= obuf_write_be16(ob, sub_command[0]); rc |= obuf_write_be16(ob, sub_command[1]); break; + case TPM2_CR50_SUB_CMD_GET_REC_BTN: + rc |= obuf_write_be16(ob, *sub_command); + break; default: /* Unsupported subcommand. */ printk(BIOS_WARNING, "Unsupported cr50 subcommand: 0x%04x\n", @@ -473,6 +476,8 @@ static int unmarshal_vendor_command(struct ibuf *ib, case TPM2_CR50_SUB_CMD_TURN_UPDATE_ON: return ibuf_read_be8(ib, &vcr->num_restored_headers); break; + case TPM2_CR50_SUB_CMD_GET_REC_BTN: + return ibuf_read_be8(ib, &vcr->recovery_button_state); default: printk(BIOS_ERR, "%s:%d - unsupported vendor command %#04x!\n", diff --git a/src/security/tpm/tss/tcg-2.0/tss_structures.h b/src/security/tpm/tss/tcg-2.0/tss_structures.h index 2bac6337e4..6952169108 100644 --- a/src/security/tpm/tss/tcg-2.0/tss_structures.h +++ b/src/security/tpm/tss/tcg-2.0/tss_structures.h @@ -297,6 +297,7 @@ struct vendor_command_response { uint16_t vc_subcommand; union { uint8_t num_restored_headers; + uint8_t recovery_button_state; }; }; |