[SeaBIOS] [PATCH 04/10] tpm: Add wrapper function tpm_set_timeouts()
Kevin O'Connor
kevin at koconnor.net
Wed Dec 30 01:17:44 CET 2015
Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
src/tcgbios.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/tcgbios.c b/src/tcgbios.c
index 9448984..b680c1d 100644
--- a/src/tcgbios.c
+++ b/src/tcgbios.c
@@ -155,6 +155,13 @@ transmit(u8 locty, struct tpm_req_header *req,
return 0;
}
+static void
+tpmhw_set_timeouts(u32 timeouts[4], u32 durations[3])
+{
+ struct tpm_driver *td = &tpm_drivers[TPMHW_driver_to_use];
+ td->set_timeouts(timeouts, durations);
+}
+
/****************************************************************
* ACPI TCPA table interface
@@ -377,7 +384,6 @@ determine_timeouts(void)
u32 returnCode;
struct tpm_res_getcap_timeouts timeouts;
struct tpm_res_getcap_durations durations;
- struct tpm_driver *td = &tpm_drivers[TPMHW_driver_to_use];
u32 i;
rc = build_and_send_cmd(0, TPM_ORD_GetCapability,
@@ -421,8 +427,7 @@ determine_timeouts(void)
durations.durations[1],
durations.durations[2]);
-
- td->set_timeouts(timeouts.timeouts, durations.durations);
+ tpmhw_set_timeouts(timeouts.timeouts, durations.durations);
return 0;
--
2.5.0
More information about the SeaBIOS
mailing list