summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2018-01-08 12:47:29 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-01-11 22:22:46 -0800
commitb31fca4b91f10be84a845222775b67553d63bf4e (patch)
tree4513a65a3a2452c102a5ffdfadae2f21add334b1 /include
parent7fbf25c0969c220e49570f67a8c32783ab23273b (diff)
downloadchrome-ec-b31fca4b91f10be84a845222775b67553d63bf4e.tar.gz
cr50: pass essential ccd commands through tpm task context
Using and extending the existing framework, move ccd commands 'password, lock, open, and unlock to the same processing path. The first three commands accept a single parameter, password. It is required for the password command and optional for unlock and open. The lock command does not require any parameters. Wiping the TPM, if necessary, now happens on the same context where CCD command is executed, i.e. the TPM task context. This is why the same context TPM reset function needs to be exported and used here. ccd_open() and ccd_unlock() could be further refactored, this would require a bit more effort to find appropriate balance between commonalities and differences. BRANCH=cr50 BUG=b:62537474 TEST=verified that ccd commands to open, unlock, lock and set and clear password all work. Change-Id: I2b9f2b550347b590a55bfaef262a4f050d3f4c1c Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/854709 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/tpm_registers.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/tpm_registers.h b/include/tpm_registers.h
index 5da9ab6c2f..b82a355170 100644
--- a/include/tpm_registers.h
+++ b/include/tpm_registers.h
@@ -55,6 +55,12 @@ int tpm_reset_request(int wait_until_done, int wipe_nvmem_first);
void tpm_reinstate_nvmem_commits(void);
/*
+ * To be called by functions running on the TPM task context. Returns
+ * EC_SUCCESS on successful reset.
+ */
+int tpm_sync_reset(int wipe_first);
+
+/*
* This structure describes the header of all commands and responses sent and
* received over TPM FIFO.
*