aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/pc80
diff options
context:
space:
mode:
authorSergii Dmytruk <sergii.dmytruk@3mdeb.com>2022-11-02 00:50:03 +0200
committerMartin L Roth <gaumless@gmail.com>2024-03-28 15:18:04 +0000
commit47e9e8cde1810ee9f249027b14ee9f82a7a52d84 (patch)
tree77771e49f8121bebb1b5904940ff7abf2714dccb /src/drivers/pc80
parent094a051732341d20e82c349ea10f85faea6e58d1 (diff)
security/tpm: replace CONFIG(TPMx) checks with runtime check
This prepares the code for enabling both CONFIG_TPM1 and CONFIG_TPM2 during compilation, in which case actual TPM family in use can be determined at runtime. In some places both compile-time and runtime checks are necessary. Yet in places like probe functions runtime state checks don't make sense as runtime state is defined by results of probing. Change-Id: Id9cc25aad8d1d7bfad12b7a92059b1b3641bbfa9 Ticket: https://ticket.coreboot.org/issues/433 Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69161 Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com> Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/pc80')
-rw-r--r--src/drivers/pc80/tpm/tis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c
index da443d3a09..568065c654 100644
--- a/src/drivers/pc80/tpm/tis.c
+++ b/src/drivers/pc80/tpm/tis.c
@@ -809,7 +809,7 @@ static void lpc_tpm_fill_ssdt(const struct device *dev)
acpigen_write_scope(path);
acpigen_write_device(acpi_device_name(dev));
- if (CONFIG(TPM2)) {
+ if (tlcl_get_family() == TPM_2) {
acpigen_write_name_string("_HID", "MSFT0101");
acpigen_write_name_string("_CID", "MSFT0101");
} else {