On Thu, Feb 13, 2020 at 02:15:03PM -0500, Stefan Berger wrote:
On 2/13/20 2:11 PM, Jason Gunthorpe wrote:These are all general purpose drivers.
On Thu, Feb 13, 2020 at 02:04:12PM -0500, Stefan Berger wrote:The following drivers are all using it:
On 2/13/20 1:35 PM, Jason Gunthorpe wrote:TIS is a generic driver, and can run on TPMs without firmware
On Thu, Feb 13, 2020 at 01:20:12PM -0500, Stefan Berger wrote:The TIS is also using it on any device.
I don't want side effects for the TPM 1.2 case here, so I am only modifyingI'm surprised this driver is using AUTO_STARTUP, it was intended for
the flag for the case where the new TPM 2 is being used. Here's the code
where it shows the effect.
embedded cases where their is no firmware to boot the TPM.
support. It doesn't know either way
drivers/char/tpm/st33zp24/st33zp24.c, line 493
drivers/char/tpm/tpm-interface.c, line 374
drivers/char/tpm/tpm_crb.c, line 421
drivers/char/tpm/tpm_ftpm_tee.c, line 184
drivers/char/tpm/tpm_i2c_atmel.c, line 139
drivers/char/tpm/tpm_i2c_infineon.c, line 602
drivers/char/tpm/tpm_i2c_nuvoton.c, line 465
drivers/char/tpm/tpm_tis_core.c, line 917
drivers/char/tpm/tpm_vtpm_proxy.c, line 435
https://elixir.bootlin.com/linux/latest/ident/TPM_OPS_AUTO_STARTUP
Though perhaps vtpm_proxy shouldn't include it, not sure.
Any driver that knows the TPM must be started prior to LinuxIs this IBM vTPM driver special that it should do things differently thanThat seems to be a mistake, proper startup of the driver should neverChips using AUTO_STARTUP are basically useless for PCRs/etc.Yes, there's supposed to be firmware.
I'd expect somthing called vtpm to have been started and PCRs working
before Linux is started??
I only see one caller to tpm2_get_cc_attrs_tbl(chip), which is necessary to
call. This caller happens to be in tpm2_auto_startup.
require auto_startup.
all those drivers listed above? From looking at the code is seems it is to
be set for the TPM 2.0 case.
booting should not use the flag. vtpm drivers in general would seem
to be the case where we can make this statement.
If it was mandatory then it would not be a flag the driver has to specify.
Jason