drivers/pc80/tpm: Disable device if TPM not present
If the TPM is not detected in the system it may mean it is inactive due to enabled ME with active PTT. In such case, the chipset will route the TPM traffic to PTT CRB TPM on Intel systems. If TPM is not probed, disable the PC80 TPM device driver, so that coreboot will not generate improper SSDT ACPI table. Change-Id: I05972ad74a36abaafa2f17a16f09710550a3a3f3 Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80455 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This commit is contained in:
committed by
Felix Held
parent
fb2c09d516
commit
3742308875
@@ -905,11 +905,16 @@ static struct pnp_info pnp_dev_info[] = {
|
||||
|
||||
static void enable_dev(struct device *dev)
|
||||
{
|
||||
if (CONFIG(TPM))
|
||||
pnp_enable_devices(dev, &lpc_tpm_ops,
|
||||
ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||
else
|
||||
if (CONFIG(TPM)) {
|
||||
if (pc80_tis_probe(NULL) == NULL) {
|
||||
dev->enabled = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
pnp_enable_devices(dev, &lpc_tpm_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||
} else {
|
||||
pnp_enable_devices(dev, &noop_tpm_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||
}
|
||||
}
|
||||
|
||||
struct chip_operations drivers_pc80_tpm_ops = {
|
||||
|
Reference in New Issue
Block a user