[SeaBIOS] [PATCH v9 1/6] Add an implementation of a TPM TIS driver

Kevin O'Connor kevin at koconnor.net
Sat Mar 21 01:59:19 CET 2015


On Fri, Mar 20, 2015 at 02:00:36PM -0400, Stefan Berger wrote:
> From: Stefan Berger <stefann at linux.vnet.ibm.com>
> 
> This patch adds an implementation of a TPM TIS driver for the TPM TIS
> emulation supported by QEMU. The driver is broken up into several
> small functions that have to be called in proper sequence. The driver is
> cleanly separated from the rest of the code through an interface holding
> pointers to the driver's functions.
> A client using this driver first probes whether the TPM TIS
> interface is available (probe function) and then invokes the interface
> function to initialze the interface and send requests and receive responses.
[...]
> +struct tpm_driver tpm_drivers[TPM_NUM_DRIVERS] = {
> +    [TIS_DRIVER_IDX] =
> +        {
> +            .timeouts      = NULL,
> +            .durations     = NULL,
> +            .set_timeouts  = set_timeouts,
> +            .probe         = tis_probe,
> +            .init          = tis_init,
> +            .activate      = tis_activate,
> +            .ready         = tis_ready,
> +            .senddata      = tis_senddata,
> +            .readresp      = tis_readresp,
> +            .waitdatavalid = tis_waitdatavalid,
> +            .waitrespready = tis_waitrespready,
> +            .sha1threshold = 100 * 1024,
> +        },
> +};

Can any of the above functions be called after SeaBIOS finishes its
POST phase?  If so, I think the function pointers may confuse the
build's detection of runtime vs init only code.

-Kevin



More information about the SeaBIOS mailing list