diff options
author | Sergii Dmytruk <sergii.dmytruk@3mdeb.com> | 2022-10-31 15:30:15 +0200 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2024-03-28 15:12:32 +0000 |
commit | febf9b9f24f537b88ea5d4845a8d350d94d9e295 (patch) | |
tree | 0755fa3edfa7e77e857173c00b7ad76af5a85668 /src/drivers/spi/tpm | |
parent | 4b76273ac963d4c5e7a85b5e47577afe4860de6b (diff) |
security/tpm: make tis_probe() return tpm_family
Via an out parameter. This is needed to be able to dynamically pick TSS
implementation based on the information discovered on probing.
Change-Id: I5006e0cdfef76ff79ce9e1cf280fcd5515ae01b0
Ticket: https://ticket.coreboot.org/issues/433
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69159
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/spi/tpm')
-rw-r--r-- | src/drivers/spi/tpm/tis.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/drivers/spi/tpm/tis.c b/src/drivers/spi/tpm/tis.c index 90d7f59ba9..89ea985da8 100644 --- a/src/drivers/spi/tpm/tis.c +++ b/src/drivers/spi/tpm/tis.c @@ -40,7 +40,7 @@ static tpm_result_t tpm_sendrecv(const uint8_t *sendbuf, size_t sbuf_size, return TPM_SUCCESS; } -tis_sendrecv_fn tis_probe(void) +tis_sendrecv_fn tis_probe(enum tpm_family *family) { struct spi_slave spi; struct tpm2_info info; @@ -56,6 +56,10 @@ tis_sendrecv_fn tis_probe(void) return NULL; } + /* tpm2_process_command() is used unconditionally in tpm_sendrecv() */ + if (family != NULL) + *family = TPM_2; + tpm2_get_info(&info); printk(BIOS_INFO, "Initialized TPM device %s revision %d\n", |