From d503ce1277b968daf9f96bb2215c8ec0e8a17f8a Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Thu, 21 Nov 2024 09:28:26 +0000 Subject: [PATCH] drivers/crb: Return an accurate status Rather than unconditionally returning that the device is present, return whether the fTPM is on or not. Test=Boot the StarLite Mk V with the Intel ME disabled, and check that the TPM is reported as not present. Change-Id: If8236021bf0e1264646971cff9c998fac99ac220 Signed-off-by: Sean Rhodes Reviewed-on: https://review.coreboot.org/c/coreboot/+/85228 Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/drivers/crb/tis.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/drivers/crb/tis.c b/src/drivers/crb/tis.c index df45125f01..0222f6d92d 100644 --- a/src/drivers/crb/tis.c +++ b/src/drivers/crb/tis.c @@ -90,7 +90,10 @@ static void crb_tpm_fill_ssdt(const struct device *dev) acpi_device_write_uid(dev); - acpigen_write_STA(ACPI_STATUS_DEVICE_ALL_ON); + if (CONFIG(HAVE_INTEL_PTT) && ptt_active()) + acpigen_write_STA(ACPI_STATUS_DEVICE_ALL_ON); + else + acpigen_write_STA(ACPI_STATUS_DEVICE_ALL_OFF); /* Resources */ acpigen_write_name("_CRS");