From 26588707c569aa2aa0237c047283a5963faa2fb5 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Thu, 2 Jun 2016 20:43:19 -0700 Subject: kconfig: allow various tpm type and interface permutations Until now it was assumed that all TPM devices were of the same type (TCG 1.2 spec compliant) and x86 based boards had LPC connected TPMs and all other boards had I2C connected TPMs. With the advent of TPM2 specification there is a need to be able to configure different combinations of TPM types (TPM or TPM2) and interfaces (LPC, I2C and SPI). This patch allows to do it. Picking Chrome OS still assumes that the board has a TPM device, but adding MAINBOARD_HAS_TPM2 to the board's Kconfig will trigger including of TPM2 instead. MAINBOARD_HAS_LPC_TPM forces the interface to be set to LPC, adding SPI_TPM to the board config switches interface choice to SPI, and if neither of the two is defined, the interface is assumed to be I2C. BRANCH=none BUG=chrome-os-partner:50645 TEST=verified that none of the generated board configurations change as a result of this patch. With the rest of the stack in place it is possible to configure different combinations of TPM types and interfaces for ARM and x86 boards. Change-Id: I24f2e3ee63636566bf2a867c51ed80a622672f07 Signed-off-by: Martin Roth Original-Commit-Id: 5a25c1070560cd2734519f87dfbf401c135088d1 Original-Change-Id: I659e9301a4a4fe065ca6537ef1fa824a08d36321 Original-Signed-off-by: Vadim Bendebury Original-Reviewed-on: https://chromium-review.googlesource.com/349850 Original-Reviewed-by: Martin Roth Reviewed-on: https://review.coreboot.org/15294 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Philipp Deppenwiese --- src/Kconfig | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'src/Kconfig') diff --git a/src/Kconfig b/src/Kconfig index 1cb55c9a7b..70438519dc 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -403,6 +403,14 @@ config FMDFILE but in some cases more complex setups are required. When an fmd is specified, it overrides the default format. +config MAINBOARD_HAS_TPM2 + bool + default n + help + There is a TPM device installed on the mainboard, and it is + compliant with version 2 TCG TPM specification. Could be connected + over LPC, SPI or I2C. + endmenu # load site-local kconfig to allow user specific defaults and overrides @@ -461,14 +469,22 @@ config RTC config TPM bool default n - select LPC_TPM if ARCH_X86 - select I2C_TPM if ARCH_ARM - select I2C_TPM if ARCH_ARM64 + select LPC_TPM if MAINBOARD_HAS_LPC_TPM + select I2C_TPM if !MAINBOARD_HAS_LPC_TPM && !SPI_TPM help Enable this option to enable TPM support in coreboot. If unsure, say N. +config TPM2 + bool + select LPC_TPM if MAINBOARD_HAS_LPC_TPM + select I2C_TPM if !MAINBOARD_HAS_LPC_TPM && !SPI_TPM + help + Enable this option to enable TPM2 support in coreboot. + + If unsure, say N. + config HEAP_SIZE hex default 0x4000 @@ -1029,7 +1045,7 @@ config X86EMU_DEBUG_TIMINGS config DEBUG_TPM bool "Output verbose TPM debug messages" default n - depends on TPM + depends on TPM || TPM2 help This option enables additional TPM related debug messages. -- cgit v1.2.3