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/crb | |
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/crb')
-rw-r--r-- | src/drivers/crb/tis.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/drivers/crb/tis.c b/src/drivers/crb/tis.c index a5d7dcc7ed..766ee25d95 100644 --- a/src/drivers/crb/tis.c +++ b/src/drivers/crb/tis.c @@ -46,7 +46,7 @@ static tpm_result_t crb_tpm_sendrecv(const uint8_t *sendbuf, size_t sbuf_size, u return TPM_SUCCESS; } -tis_sendrecv_fn tis_probe(void) +tis_sendrecv_fn tis_probe(enum tpm_family *family) { struct tpm2_info info; @@ -54,6 +54,10 @@ tis_sendrecv_fn tis_probe(void) if (tpm2_init()) return NULL; + /* CRB interface exists only in TPM2 */ + if (family != NULL) + *family = TPM_2; + tpm2_get_info(&info); printk(BIOS_INFO, "Initialized TPM device %s revision %d\n", tis_get_dev_name(&info), |