Perform the hardware probe once during setup instead of checking if
the probe has been completed on each measurement event.
Don't probe for hardware during BIOS interface detection. Just check
if the hardware is in a working state.
Unify has_working_tpm() with similar tpm_is_working().
There are no longer any callers that use the response buffer.
Signed-off-by: Kevin O'Connor
---
src/tcgbios.c | 45 +
1 file changed, 17 insertions(+), 28 deletions(-)
diff --git a/src/tcgbios.c b/src/tcgbios.c
index
The TPM ACPI tables are only scanned once at startup and the code can
rely on that. Merge find_tcpa_table() into find_tcpa_by_rsdp(), merge
get_lasa_base_ptr() into reset_acpi_log(), and merge tpm_acpi_init()
into tpm_setup().
The tpm_state structure is now only used for TCPA tracking.
The following series involves some code reorganization in the TPM code
that I found useful in understanding the code.
Patches 3-5 simplify the hardware interface by only exporting three
commands to the underlying TIS hardware (tpmhw_probe, tpmhw_transmit,
tpmhw_set_timeouts).
Patches 8-10
The 16bit BIOS interface should only shutdown on request from that
interface - errors from the tcp or acpi log setup should not shutdown
the interface. (Errors from those functions will cause the TPM to be
in a "not working" state which will cause all the 16bit interface
functions to fail.)
Move the hardware interface functions (tpmhw_probe, tpmhw_transmit,
and tpmhw_set_timeouts) to tpm_drivers.c code, and only export those
functions. This simplifies the hardware interface.
Signed-off-by: Kevin O'Connor
---
src/hw/tpm_drivers.c | 84
The callers interested in the return status of build_and_send_cmd()
are only interested in the command return code status (returnCode) and
not the status of the message transmission (rc). Simplify the callers
by returning returnCode directly instead of via a pointer parameter.
For the unlikely
Signed-off-by: Kevin O'Connor
---
src/tcgbios.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/src/tcgbios.c b/src/tcgbios.c
index 7b93d87..4f78c42 100644
--- a/src/tcgbios.c
+++ b/src/tcgbios.c
@@ -1187,6 +1187,11 @@ tpm_interrupt_handler32(struct bregs *regs)
Signed-off-by: Kevin O'Connor
---
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
Avoid macros and use regular struct definitions for the request and
response headers. This simplifies the header and reduces the need for
casts in the code.
Signed-off-by: Kevin O'Connor
---
src/std/tcg.h | 40 +---
src/tcgbios.c | 11
On 12/29/2015 07:17 PM, Kevin O'Connor wrote:
Introduce helper function to call the TPM_ORD_GetCapability command.
Update all get capability callers to use this helper.
Signed-off-by: Kevin O'Connor
---
src/std/tcg.h | 17 +++---
src/tcgbios.c | 176
On Tue, Dec 29, 2015 at 10:11:14PM -0500, Stefan Berger wrote:
> On 12/29/2015 07:17 PM, Kevin O'Connor wrote:
> >The callers interested in the return status of build_and_send_cmd()
> >are only interested in the command return code status (returnCode) and
> >not the status of the message
On 12/29/2015 07:17 PM, Kevin O'Connor wrote:
The callers interested in the return status of build_and_send_cmd()
are only interested in the command return code status (returnCode) and
not the status of the message transmission (rc). Simplify the callers
by returning returnCode directly instead
On Tue, Dec 29, 2015 at 09:09:09PM -0500, Stefan Berger wrote:
> On 12/29/2015 07:17 PM, Kevin O'Connor wrote:
> >+static int
> >+tpm_get_capability(u32 cap, u32 subcap, struct tpm_rsp_header *rsp, u32
> >rsize)
> >+{
> >+struct tpm_req_getcap trgc = {
> >+.hdr.tag =
14 matches
Mail list logo