Michał Żygowski has uploaded this change for review.

View Change

drivers/crb: Disable device if CRB TPM not present

If CRB TPM is not detected in the system it may mean it is inactive
due to disabled or neutered ME. In such case, the chipset will route
the TPM traffic to LPC/SPI on Intel systems.

If CRB TPM is not probed, disable the CRB TPM device driver, so that
coreboot will not generate improper SMBIOS/SSDT ACPI tables.

Change-Id: Ie0928536d9042b1f680d585e1ca9ad2cadf0c8ef
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
---
M src/drivers/crb/tis.c
1 file changed, 7 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/54/80454/1
diff --git a/src/drivers/crb/tis.c b/src/drivers/crb/tis.c
index 2176cc6..23cd55e 100644
--- a/src/drivers/crb/tis.c
+++ b/src/drivers/crb/tis.c
@@ -208,6 +208,13 @@

static void enable_dev(struct device *dev)
{
+ enum tpm_family family;
+
+ if (crb_tis_probe(&family) == NULL) {
+ dev->enabled = 0;
+ return;
+ }
+
#if !DEVTREE_EARLY
dev->ops = &crb_ops;
#endif

To view, visit change 80454. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ie0928536d9042b1f680d585e1ca9ad2cadf0c8ef
Gerrit-Change-Number: 80454
Gerrit-PatchSet: 1
Gerrit-Owner: Michał Żygowski <michal.zygowski@3mdeb.com>
Gerrit-MessageType: newchange