[SeaBIOS] [PATCH 03/10] tpm: Simplify hardware probe and detection checks

Stefan Berger stefanb at linux.vnet.ibm.com
Thu Dec 31 00:57:23 CET 2015


On 12/29/2015 07:17 PM, Kevin O'Connor wrote:
> 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().
>
> Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
[...]
> @@ -158,10 +123,10 @@ transmit(u8 locty, struct tpm_req_header *req,
>            void *respbuffer, u32 *respbufferlen,
>            enum tpmDurationType to_t)
>   {
> -    if (tpm_state.tpm_driver_to_use == TPM_INVALID_DRIVER)
> +    if (TPMHW_driver_to_use == TPM_INVALID_DRIVER)
>           return TCG_FATAL_COM_ERROR;
>
> -    struct tpm_driver *td = &tpm_drivers[tpm_state.tpm_driver_to_use];
> +    struct tpm_driver *td = &tpm_drivers[TPMHW_driver_to_use];
>
>       u32 irc = td->activate(locty);
>       if (irc != 0) {
> @@ -329,6 +294,14 @@ tpm_log_event(struct pcpes *pcpes, const void *event)
>    * Helper functions
>    ****************************************************************/
>
> +static u8 TPM_working;

Should this not also have VARLOW to not be ROM'ed?

    Stefan




More information about the SeaBIOS mailing list