aboutsummaryrefslogtreecommitdiffstats
path: root/src/tcgbios.c
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.vnet.ibm.com>2015-11-21 14:54:41 -0500
committerKevin O'Connor <kevin@koconnor.net>2015-11-22 10:12:34 -0500
commitec42c8dc69be8eda4fc794c8cd5f030ed38cea30 (patch)
tree28615e4456d03c1a75c1d3de873b6f53c9b0f42a /src/tcgbios.c
parent47b9df59f877ce85203ae6a845f9e115d4b67613 (diff)
downloadseabios-ec42c8dc69be8eda4fc794c8cd5f030ed38cea30.tar.gz
tpm: Set timeouts and durations to microsecond values
Fix the timeouts and durations -- they are provided in microseconds. Adapt the TPM driver for it. Get TPM specific timeout and duration values earlier from the device. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Diffstat (limited to 'src/tcgbios.c')
-rw-r--r--src/tcgbios.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tcgbios.c b/src/tcgbios.c
index decf0fd4..38bc7376 100644
--- a/src/tcgbios.c
+++ b/src/tcgbios.c
@@ -459,6 +459,10 @@ tpm_startup(void)
if (rc || returnCode)
goto err_exit;
+ rc = determine_timeouts();
+ if (rc)
+ goto err_exit;
+
rc = build_and_send_cmd(0, TPM_ORD_SelfTestFull, NULL, 0,
NULL, 0, &returnCode, TPM_DURATION_TYPE_LONG);
@@ -477,10 +481,6 @@ tpm_startup(void)
if (rc || (returnCode != 0 && returnCode != TPM_BAD_LOCALITY))
goto err_exit;
- rc = determine_timeouts();
- if (rc)
- goto err_exit;
-
rc = tpm_smbios_measure();
if (rc)
goto err_exit;