1 # SPDX-License-Identifier: GPL-2.0-only
3 source "src/security/tpm/tss/vendor/cr50/Kconfig"
5 menu "Trusted Platform Module"
9 default y if !TPM1 && !TPM2
11 No TPM support. Select this option if your system doesn't have a TPM,
12 or if you don't want coreboot to communicate with your TPM in any way.
13 (If your board doesn't offer a TPM interface, this will be the only
18 depends on I2C_TPM || MEMORY_MAPPED_TPM || SPI_TPM || CRB_TPM
19 default y if MAINBOARD_HAS_TPM1
21 Select this option if your TPM uses the older TPM 1.2 protocol.
25 depends on I2C_TPM || MEMORY_MAPPED_TPM || SPI_TPM || CRB_TPM
26 default y if MAINBOARD_HAS_TPM2
28 Select this option if your TPM uses the newer TPM 2.0 protocol.
33 depends on TPM1 || TPM2
35 config MAINBOARD_HAS_TPM1
38 This option can be selected by a mainboard to represent that its TPM
39 always uses the 1.2 protocol, and that it should be on by default.
41 config MAINBOARD_HAS_TPM2
44 This option can be selected by a mainboard to represent that its TPM
45 always uses the 2.0 protocol, and that it should be on by default.
48 bool "Deactivate TPM (for TPM1)"
53 Deactivate TPM by issuing deactivate command.
56 bool "Output verbose TPM debug messages"
58 select DRIVER_TPM_DISPLAY_TIS_BYTES if I2C_TPM
61 This option enables additional TPM related debug messages.
63 config TPM_STARTUP_IGNORE_POSTINIT
66 Select this to ignore POSTINIT INVALID return codes on TPM
67 startup. This is useful on platforms where a previous stage
68 issued a TPM startup. Examples of use cases are Intel TXT
69 or VBOOT on the Intel Arrandale processor, which issues a
70 CPU-only reset during the romstage.
72 config TPM_MEASURED_BOOT
73 bool "Enable Measured Boot"
77 depends on !VBOOT_RETURN_FROM_VERSTAGE
79 Enables measured boot (experimental)
82 prompt "TPM event log format"
83 depends on TPM_MEASURED_BOOT
84 default TPM_LOG_TPM1 if TPM1
85 default TPM_LOG_TPM2 if TPM2
88 bool "coreboot's custom format"
90 Custom coreboot-specific format of the log derived from TPM1 log format.
93 depends on TPM1 && !TPM2
95 Log per TPM 1.2 specification.
96 See "TCG PC Client Specific Implementation Specification for Conventional BIOS".
99 depends on TPM1 || TPM2
101 Log per TPM 2.0 specification.
102 See "TCG PC Client Platform Firmware Profile Specification".
107 prompt "TPM2 hashing algorithm"
108 depends on TPM_MEASURED_BOOT && TPM_LOG_TPM2
109 default TPM_HASH_SHA1 if TPM1
110 default TPM_HASH_SHA256 if TPM2
114 config TPM_HASH_SHA256
116 config TPM_HASH_SHA384
118 config TPM_HASH_SHA512
123 config TPM_MEASURED_BOOT_INIT_BOOTBLOCK
125 depends on TPM_MEASURED_BOOT && !VBOOT
127 Initialize TPM inside the bootblock instead of ramstage. This is
128 useful with some form of hardware assisted root of trust
129 measurement like Intel TXT/CBnT.
131 config TPM_MEASURED_BOOT_RUNTIME_DATA
132 string "Runtime data whitelist"
134 depends on TPM_MEASURED_BOOT
136 Runtime data whitelist of cbfs filenames. Needs to be a
141 default 0 if CHROMEOS
156 # PCR for measuring data which changes during runtime
157 # e.g. CMOS, NVRAM...
158 config PCR_RUNTIME_DATA
162 endmenu # Trusted Platform Module (tpm)
164 config TPM_SETUP_HIBERNATE_ON_ERR
166 depends on EC_GOOGLE_CHROMEEC
169 Select this to force a device to hibernate on the next AP shutdown when a TPM
170 setup error occurs. This will cause a cold boot of the system and offer an
171 opportunity to recover the TPM should it be hung. This is only effective if
172 the Z-State brings the power rail down.