From f303b4ffd92caf479153245a720c79eca5edb4ba Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Thu, 27 May 2021 19:33:57 +0300 Subject: Apply more uses for Kconfig TPM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I54b296563940cd46fe9da9fe789b746f2fc1987d Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/55016 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Julius Werner Reviewed-by: Paul Menzel --- src/drivers/tpm/Kconfig | 4 ++-- src/security/intel/txt/Kconfig | 2 +- src/security/tpm/Kconfig | 4 ++-- src/security/vboot/Kconfig | 2 +- src/security/vboot/Makefile.inc | 4 +--- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/drivers/tpm/Kconfig b/src/drivers/tpm/Kconfig index 79b860f89b..735cfeebb8 100644 --- a/src/drivers/tpm/Kconfig +++ b/src/drivers/tpm/Kconfig @@ -1,6 +1,6 @@ config TPM_INIT_RAMSTAGE bool - default y if TPM1 || TPM2 + default y if TPM depends on !VBOOT && !VENDORCODE_ELTAN_VBOOT && !VENDORCODE_ELTAN_MBOOT \ && !TPM_MEASURED_BOOT_INIT_BOOTBLOCK help @@ -9,7 +9,7 @@ config TPM_INIT_RAMSTAGE config TPM_PPI bool "Generate ACPI code to implement TPM physical presence interface" - depends on TPM1 || TPM2 + depends on TPM depends on HAVE_ACPI_TABLES depends on !CHROMEOS default y if PAYLOAD_TIANOCORE diff --git a/src/security/intel/txt/Kconfig b/src/security/intel/txt/Kconfig index 14b4f6a722..36489256b9 100644 --- a/src/security/intel/txt/Kconfig +++ b/src/security/intel/txt/Kconfig @@ -7,7 +7,7 @@ config INTEL_TXT select ENABLE_VMX if CPU_INTEL_COMMON select AP_IN_SIPI_WAIT select TPM_MEASURED_BOOT_INIT_BOOTBLOCK if TPM_MEASURED_BOOT - depends on (TPM1 || TPM2) + depends on TPM depends on CPU_INTEL_FIRMWARE_INTERFACE_TABLE depends on PLATFORM_HAS_DRAM_CLEAR depends on (SOC_INTEL_COMMON_BLOCK_SA || HAVE_CF9_RESET) diff --git a/src/security/tpm/Kconfig b/src/security/tpm/Kconfig index e228a3d435..4864f12545 100644 --- a/src/security/tpm/Kconfig +++ b/src/security/tpm/Kconfig @@ -70,7 +70,7 @@ config DEBUG_TPM bool "Output verbose TPM debug messages" default n select DRIVER_TPM_DISPLAY_TIS_BYTES if I2C_TPM - depends on TPM1 || TPM2 + depends on TPM help This option enables additional TPM related debug messages. @@ -96,7 +96,7 @@ config TPM_MEASURED_BOOT bool "Enable Measured Boot" default n select VBOOT_LIB - depends on TPM1 || TPM2 + depends on TPM depends on !VBOOT_RETURN_FROM_VERSTAGE help Enables measured boot (experimental) diff --git a/src/security/vboot/Kconfig b/src/security/vboot/Kconfig index 515efc7bef..036875884b 100644 --- a/src/security/vboot/Kconfig +++ b/src/security/vboot/Kconfig @@ -13,7 +13,7 @@ config VBOOT bool "Verify firmware with vboot." default n select VBOOT_LIB - select VBOOT_MOCK_SECDATA if !TPM1 && !TPM2 + select VBOOT_MOCK_SECDATA if !TPM depends on 0 = 0 # Must have a 'depends on' or board overrides will break it. help Enabling VBOOT will use vboot to verify the components of the firmware diff --git a/src/security/vboot/Makefile.inc b/src/security/vboot/Makefile.inc index 668d3d9dd5..47830f3c62 100644 --- a/src/security/vboot/Makefile.inc +++ b/src/security/vboot/Makefile.inc @@ -109,9 +109,7 @@ romstage-y += secdata_tpm.c ramstage-y += secdata_tpm.c endif -ifneq ($(CONFIG_TPM1)$(CONFIG_TPM2),) -verstage-y += tpm_common.c -endif +verstage-$(CONFIG_TPM) += tpm_common.c romstage-y += common.c -- cgit v1.2.3