summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-12-20 10:42:31 -0800
committerSimon Glass <sjg@chromium.org>2012-01-05 19:19:29 -0800
commitd44f5f509403db4122ed0b4fc612904b172d2bb5 (patch)
tree96b727113da8795ca4f4753e19231fedb6ae6746 /lib
parent86e63e0fe2ed12a5e2dcb0c8b3e4b6f074de558f (diff)
Add bootstage timing to TPM operations
Records the total time taken by TPM operations for display as part of the bootstage report. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: I7ce6efa3c2bb90858d17ab6613724e6ae73d918b Reviewed-on: https://gerrit.chromium.org/gerrit/13371 Commit-Ready: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/vbexport/tlcl_stub.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/vbexport/tlcl_stub.c b/lib/vbexport/tlcl_stub.c
index 63e70bc2e9..241bceb127 100644
--- a/lib/vbexport/tlcl_stub.c
+++ b/lib/vbexport/tlcl_stub.c
@@ -41,7 +41,12 @@ VbError_t VbExTpmOpen(void)
VbError_t VbExTpmSendReceive(const uint8_t* request, uint32_t request_length,
uint8_t* response, uint32_t* response_length)
{
- if (tis_sendrecv(request, request_length, response, response_length))
+ int err;
+
+ bootstage_start(BOOTSTAGE_TPM_SEND_RECV, "tpm_send_recv");
+ err = tis_sendrecv(request, request_length, response, response_length);
+ bootstage_accum(BOOTSTAGE_TPM_SEND_RECV);
+ if (err)
return TPM_E_IOERROR;
return TPM_SUCCESS;
}