[coreboot] SPI TPM question

Jorge Fernandez Monteagudo jorgefm at cirsa.com
Mon May 21 08:19:11 CEST 2018


Hi Julius!


Thanks for the report! It seems it will not be easy to add SPI TPM support... I'm waiting for some TPMs 1.2 and 2.0 over LPC

and the demoboard (AMD Bettong) I'm using has the LPC connector available to test.. In the meantime I'll try to find any

solution.


Regards

Jorge

________________________________
De: Julius Werner <jwerner at chromium.org>
Enviado: sábado, 19 de mayo de 2018 2:05:42
Para: Jorge Fernandez Monteagudo
Cc: zaolin at das-labor.org; Coreboot
Asunto: Re: [coreboot] SPI TPM question

> build/romstage/drivers/spi/spi-generic.o: In function `spi_setup_slave':

/mnt/develop/bettong/coreboot/master/coreboot/src/drivers/spi/spi-generic.c:129:
undefined reference to `spi_ctrlr_bus_map'

/mnt/develop/bettong/coreboot/master/coreboot/src/drivers/spi/spi-generic.c:131:
undefined reference to `spi_ctrlr_bus_map_count'

/mnt/develop/bettong/coreboot/master/coreboot/src/drivers/spi/spi-generic.c:134:
undefined reference to `spi_ctrlr_bus_map'

This indicates that your chipset does not support the SPI API. Even if the
generic TPM SPI driver would work with your TPM, you still need chipset
code that tells it how to work with your particular SPI controller. This
would usually be part of the southbridge code (e.g. compare
src/southbridge/intel/common/spi.c, which defines the spi_ctrlr_bus_map
array for some Intel chipsets... although that particular controller would
not work for TPMs either).

> build/romstage/drivers/spi/tpm/tpm.o: In function `stopwatch_tick':
> /mnt/develop/bettong/coreboot/master/coreboot/src/include/timer.h:155:
undefined reference to `timer_monotonic_get'
> build/romstage/drivers/spi/tpm/tpm.o: In function `stopwatch_init':
> /mnt/develop/bettong/coreboot/master/coreboot/src/include/timer.h:131:
undefined reference to `timer_monotonic_get'
> /mnt/develop/bettong/coreboot/master/coreboot/src/include/timer.h:131:
undefined reference to `timer_monotonic_get'
> /mnt/develop/bettong/coreboot/master/coreboot/src/include/timer.h:131:
undefined reference to `timer_monotonic_get'

This indicates that your chipset does not support the monotonic timer API.
Without timers the stopwatch API doesn't work that's used by the TPM
drivers to measure certain transfer timeouts. Looks like some older AMD
CPUs have that support (see
src/cpu/amd/family_10h-family_15h/monotonic_timer.c), not sure why yours
doesn't (probably nobody ever bothered to add it).

> The SPI tpm driver was written for tpm 2.0 only.

It's even worse than that... I think the current SPI TPM driver only
supports Cr50, which is a special TPM 2.0 with a bunch of custom quirks
that is only used in Chromebooks. Patches to expand it to support other
TPMs are welcome, of course, but I don't think anybody has worked on that
for now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot/attachments/20180521/699f0988/attachment.html>


More information about the coreboot mailing list