| 1 |
# SPDX-License-Identifier: GPL-2.0-only |
| 2 |
|
| 3 |
source "src/security/tpm/tss/vendor/cr50/Kconfig" |
| 4 |
|
| 5 |
menu "Trusted Platform Module" |
| 6 |
|
| 7 |
config NO_TPM |
| 8 |
bool |
| 9 |
default y if !TPM1 && !TPM2 |
| 10 |
help |
| 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 |
| 14 |
possible option.) |
| 15 |
|
| 16 |
config TPM1 |
| 17 |
bool "TPM 1.2" |
| 18 |
depends on I2C_TPM || MEMORY_MAPPED_TPM || SPI_TPM || CRB_TPM |
| 19 |
default y if MAINBOARD_HAS_TPM1 |
| 20 |
help |
| 21 |
Select this option if your TPM uses the older TPM 1.2 protocol. |
| 22 |
|
| 23 |
config TPM2 |
| 24 |
bool "TPM 2.0" |
| 25 |
depends on I2C_TPM || MEMORY_MAPPED_TPM || SPI_TPM || CRB_TPM |
| 26 |
default y if MAINBOARD_HAS_TPM2 |
| 27 |
help |
| 28 |
Select this option if your TPM uses the newer TPM 2.0 protocol. |
| 29 |
|
| 30 |
config TPM |
| 31 |
bool |
| 32 |
default y |
| 33 |
depends on TPM1 || TPM2 |
| 34 |
|
| 35 |
config MAINBOARD_HAS_TPM1 |
| 36 |
bool |
| 37 |
help |
| 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. |
| 40 |
|
| 41 |
config MAINBOARD_HAS_TPM2 |
| 42 |
bool |
| 43 |
help |
| 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. |
| 46 |
|
| 47 |
config TPM_DEACTIVATE |
| 48 |
bool "Deactivate TPM (for TPM1)" |
| 49 |
default n |
| 50 |
depends on !VBOOT |
| 51 |
depends on TPM1 |
| 52 |
help |
| 53 |
Deactivate TPM by issuing deactivate command. |
| 54 |
|
| 55 |
config DEBUG_TPM |
| 56 |
bool "Output verbose TPM debug messages" |
| 57 |
default n |
| 58 |
select DRIVER_TPM_DISPLAY_TIS_BYTES if I2C_TPM |
| 59 |
depends on TPM |
| 60 |
help |
| 61 |
This option enables additional TPM related debug messages. |
| 62 |
|
| 63 |
config TPM_STARTUP_IGNORE_POSTINIT |
| 64 |
bool |
| 65 |
help |
| 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. |
| 71 |
|
| 72 |
config TPM_MEASURED_BOOT |
| 73 |
bool "Enable Measured Boot" |
| 74 |
default n |
| 75 |
select VBOOT_LIB |
| 76 |
depends on TPM |
| 77 |
depends on !VBOOT_RETURN_FROM_VERSTAGE |
| 78 |
help |
| 79 |
Enables measured boot (experimental) |
| 80 |
|
| 81 |
config TPM_MEASURE_MRC_CACHE |
| 82 |
bool "Measure MRC cache" |
| 83 |
default n |
| 84 |
depends on TPM_MEASURED_BOOT |
| 85 |
depends on CACHE_MRC_SETTINGS |
| 86 |
help |
| 87 |
Measures MRC cache as runtime data to guarantee that a |
| 88 |
tamper with the memory will be detected. The runtime data |
| 89 |
measurement becomes stable after the second boot after |
| 90 |
changing DIMM. |
| 91 |
|
| 92 |
choice |
| 93 |
prompt "TPM event log format" |
| 94 |
depends on TPM_MEASURED_BOOT |
| 95 |
default TPM_LOG_TPM1 if TPM1 |
| 96 |
default TPM_LOG_TPM2 if TPM2 |
| 97 |
|
| 98 |
config TPM_LOG_CB |
| 99 |
bool "coreboot's custom format" |
| 100 |
help |
| 101 |
Custom coreboot-specific format of the log derived from TPM1 log format. |
| 102 |
config TPM_LOG_TPM1 |
| 103 |
bool "TPM 1.2 format" |
| 104 |
depends on TPM1 && !TPM2 |
| 105 |
help |
| 106 |
Log per TPM 1.2 specification. |
| 107 |
See "TCG PC Client Specific Implementation Specification for Conventional BIOS". |
| 108 |
config TPM_LOG_TPM2 |
| 109 |
bool "TPM 2.0 format" |
| 110 |
depends on TPM1 || TPM2 |
| 111 |
help |
| 112 |
Log per TPM 2.0 specification. |
| 113 |
See "TCG PC Client Platform Firmware Profile Specification". |
| 114 |
|
| 115 |
endchoice |
| 116 |
|
| 117 |
choice |
| 118 |
prompt "TPM2 hashing algorithm" |
| 119 |
depends on TPM_MEASURED_BOOT && TPM_LOG_TPM2 |
| 120 |
default TPM_HASH_SHA1 if TPM1 |
| 121 |
default TPM_HASH_SHA256 if TPM2 |
| 122 |
|
| 123 |
config TPM_HASH_SHA1 |
| 124 |
bool "SHA1" |
| 125 |
config TPM_HASH_SHA256 |
| 126 |
bool "SHA256" |
| 127 |
config TPM_HASH_SHA384 |
| 128 |
bool "SHA384" |
| 129 |
config TPM_HASH_SHA512 |
| 130 |
bool "SHA512" |
| 131 |
|
| 132 |
endchoice |
| 133 |
|
| 134 |
config TPM_MEASURED_BOOT_INIT_BOOTBLOCK |
| 135 |
bool |
| 136 |
depends on TPM_MEASURED_BOOT && !VBOOT |
| 137 |
help |
| 138 |
Initialize TPM inside the bootblock instead of ramstage. This is |
| 139 |
useful with some form of hardware assisted root of trust |
| 140 |
measurement like Intel TXT/CBnT. |
| 141 |
|
| 142 |
config TPM_MEASURED_BOOT_RUNTIME_DATA |
| 143 |
string "Runtime data whitelist" |
| 144 |
default "" |
| 145 |
depends on TPM_MEASURED_BOOT |
| 146 |
help |
| 147 |
Runtime data whitelist of cbfs filenames. Needs to be a |
| 148 |
space delimited list |
| 149 |
|
| 150 |
config PCR_BOOT_MODE |
| 151 |
int |
| 152 |
default 0 if CHROMEOS |
| 153 |
default 1 |
| 154 |
|
| 155 |
config PCR_HWID |
| 156 |
int |
| 157 |
default 1 |
| 158 |
|
| 159 |
config PCR_SRTM |
| 160 |
int |
| 161 |
default 2 |
| 162 |
|
| 163 |
config PCR_FW_VER |
| 164 |
int |
| 165 |
default 10 |
| 166 |
|
| 167 |
# PCR for measuring data which changes during runtime |
| 168 |
# e.g. CMOS, NVRAM... |
| 169 |
config PCR_RUNTIME_DATA |
| 170 |
int |
| 171 |
default 3 |
| 172 |
|
| 173 |
endmenu # Trusted Platform Module (tpm) |
| 174 |
|
| 175 |
config TPM_SETUP_HIBERNATE_ON_ERR |
| 176 |
bool |
| 177 |
depends on EC_GOOGLE_CHROMEEC |
| 178 |
default y |
| 179 |
help |
| 180 |
Select this to force a device to hibernate on the next AP shutdown when a TPM |
| 181 |
setup error occurs. This will cause a cold boot of the system and offer an |
| 182 |
opportunity to recover the TPM should it be hung. This is only effective if |
| 183 |
the Z-State brings the power rail down. |