aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Kconfig24
-rw-r--r--src/drivers/i2c/tpm/Kconfig2
-rw-r--r--src/drivers/spi/tpm/Kconfig8
-rw-r--r--src/vendorcode/google/chromeos/Kconfig3
4 files changed, 31 insertions, 6 deletions
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.
diff --git a/src/drivers/i2c/tpm/Kconfig b/src/drivers/i2c/tpm/Kconfig
index f2b969f5bb..594ffd51b3 100644
--- a/src/drivers/i2c/tpm/Kconfig
+++ b/src/drivers/i2c/tpm/Kconfig
@@ -1,6 +1,6 @@
config I2C_TPM
bool "I2C TPM"
- depends on !PC80_SYSTEM # for now
+ depends on TPM || TPM2
config DRIVER_TPM_I2C_BUS
hex "I2C TPM chip bus"
diff --git a/src/drivers/spi/tpm/Kconfig b/src/drivers/spi/tpm/Kconfig
new file mode 100644
index 0000000000..e2a6bb6527
--- /dev/null
+++ b/src/drivers/spi/tpm/Kconfig
@@ -0,0 +1,8 @@
+config SPI_TPM
+ bool "SPI TPM"
+ depends on !PC80_SYSTEM && TPM2
+
+config DRIVER_TPM_SPI_BUS
+ hex "SPI bus TPM chip is connected to"
+ default 0
+ depends on SPI_TPM
diff --git a/src/vendorcode/google/chromeos/Kconfig b/src/vendorcode/google/chromeos/Kconfig
index 269c176e14..f97a4e14ea 100644
--- a/src/vendorcode/google/chromeos/Kconfig
+++ b/src/vendorcode/google/chromeos/Kconfig
@@ -21,7 +21,8 @@ menu "ChromeOS"
config CHROMEOS
bool "Build for ChromeOS"
default n
- select TPM
+ select TPM if !MAINBOARD_HAS_TPM2
+ select TPM2 if MAINBOARD_HAS_TPM2
select TPM_INIT_FAILURE_IS_FATAL if PC80_SYSTEM && LPC_TPM
select SKIP_TPM_STARTUP_ON_NORMAL_BOOT if PC80_SYSTEM && LPC_TPM
select BOOTMODE_STRAPS