From 12a022685da02b5b409a65347bdee1ba86b5b53d Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Mon, 20 Sep 2021 21:33:04 -0700 Subject: tpm_vendor_cmds: add command for AP RO verification The new command will be used for context switching to make the large stack of the TPM task available to the AP RO verification code. Note that we don't want the AP to be able to send this vendor command, some extension_route_command() enhancement might be necessary. BUG=b:199904580 TEST=tested along with AP RO verification implementation. Signed-off-by: Vadim Bendebury Change-Id: I8599479752b4a7b1982b75cfea61ffad3950681d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3172255 Reviewed-by: Andrey Pronin --- common/extension.c | 1 + include/tpm_vendor_cmds.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/common/extension.c b/common/extension.c index fb08c0bc3f..e65cf18880 100644 --- a/common/extension.c +++ b/common/extension.c @@ -45,6 +45,7 @@ uint32_t extension_route_command(struct vendor_cmd_params *p) case VENDOR_CC_RMA_CHALLENGE_RESPONSE: case VENDOR_CC_SPI_HASH: /* Requires physical presence. */ case VENDOR_CC_TURN_UPDATE_ON: + case VENDOR_CC_AP_RO_VALIDATE: break; default: /* Otherwise, we don't allow this command. */ diff --git a/include/tpm_vendor_cmds.h b/include/tpm_vendor_cmds.h index b127a05082..73647eca5a 100644 --- a/include/tpm_vendor_cmds.h +++ b/include/tpm_vendor_cmds.h @@ -155,6 +155,8 @@ enum vendor_cmd_cc { VENDOR_CC_GET_AP_RO_STATUS = 57, + VENDOR_CC_AP_RO_VALIDATE = 58, + LAST_VENDOR_COMMAND = 65535, }; -- cgit v1.2.1