blob: 5bc817d7f3189280cbd05f634761ef75d9b321c4 [file] [log] [blame]
Elyes HAOUASf7b2fe62020-05-07 12:38:15 +02001# SPDX-License-Identifier: GPL-2.0-only
Philipp Deppenwiese64e2d192017-10-18 17:13:07 +02002
Philipp Deppenwiesec07f8fb2018-02-27 19:40:52 +01003source "src/security/tpm/tss/vendor/cr50/Kconfig"
4
Philipp Deppenwiese64e2d192017-10-18 17:13:07 +02005menu "Trusted Platform Module"
6
Julius Werner8ad93792021-05-18 17:15:50 -07007choice
8 prompt "Trusted Platform Module"
9 default TPM2 if MAINBOARD_HAS_TPM2
10 default TPM1 if MAINBOARD_HAS_TPM1
11 default NO_TPM
12
13config NO_TPM
14 bool "No TPM"
15 help
16 No TPM support. Select this option if your system doesn't have a TPM,
17 or if you don't want coreboot to communicate with your TPM in any way.
18 (If your board doesn't offer a TPM interface, this will be the only
19 possible option.)
20
Philipp Deppenwiesec07f8fb2018-02-27 19:40:52 +010021config TPM1
Julius Werner8ad93792021-05-18 17:15:50 -070022 bool "TPM 1.2"
Jes B. Klinkec6b041a12022-04-19 14:00:33 -070023 depends on I2C_TPM || MEMORY_MAPPED_TPM || SPI_TPM || CRB_TPM
Julius Werner8ad93792021-05-18 17:15:50 -070024 depends on !MAINBOARD_HAS_TPM2
25 help
26 Select this option if your TPM uses the older TPM 1.2 protocol.
Philipp Deppenwiese64e2d192017-10-18 17:13:07 +020027
28config TPM2
Julius Werner8ad93792021-05-18 17:15:50 -070029 bool "TPM 2.0"
Jes B. Klinkec6b041a12022-04-19 14:00:33 -070030 depends on I2C_TPM || MEMORY_MAPPED_TPM || SPI_TPM || CRB_TPM
Julius Werner8ad93792021-05-18 17:15:50 -070031 depends on !MAINBOARD_HAS_TPM1
32 help
33 Select this option if your TPM uses the newer TPM 2.0 protocol.
34
35endchoice
Philipp Deppenwiese64e2d192017-10-18 17:13:07 +020036
Kyösti Mälkkid2b2a182021-04-29 15:33:07 +030037config TPM
38 bool
39 default y
40 depends on TPM1 || TPM2
41
Philipp Deppenwiesec07f8fb2018-02-27 19:40:52 +010042config MAINBOARD_HAS_TPM1
43 bool
Julius Werner8ad93792021-05-18 17:15:50 -070044 help
45 This option can be selected by a mainboard to represent that its TPM
46 always uses the 1.2 protocol, and that it should be on by default.
Philipp Deppenwiesec07f8fb2018-02-27 19:40:52 +010047
48config MAINBOARD_HAS_TPM2
49 bool
Philipp Deppenwiesec07f8fb2018-02-27 19:40:52 +010050 help
Julius Werner8ad93792021-05-18 17:15:50 -070051 This option can be selected by a mainboard to represent that its TPM
52 always uses the 2.0 protocol, and that it should be on by default.
Philipp Deppenwiesec07f8fb2018-02-27 19:40:52 +010053
54config TPM_DEACTIVATE
55 bool "Deactivate TPM"
56 default n
57 depends on !VBOOT
58 depends on TPM1
59 help
60 Deactivate TPM by issuing deactivate command.
Philipp Deppenwiese64e2d192017-10-18 17:13:07 +020061
62config DEBUG_TPM
63 bool "Output verbose TPM debug messages"
64 default n
Philipp Deppenwiesec07f8fb2018-02-27 19:40:52 +010065 select DRIVER_TPM_DISPLAY_TIS_BYTES if I2C_TPM
Kyösti Mälkkif303b4f2021-05-27 19:33:57 +030066 depends on TPM
Philipp Deppenwiese64e2d192017-10-18 17:13:07 +020067 help
68 This option enables additional TPM related debug messages.
69
Philipp Deppenwiesec07f8fb2018-02-27 19:40:52 +010070config TPM_RDRESP_NEED_DELAY
71 bool "Enable Delay Workaround for TPM"
Philipp Deppenwiese64e2d192017-10-18 17:13:07 +020072 default n
Jes B. Klinkec6b041a12022-04-19 14:00:33 -070073 depends on MEMORY_MAPPED_TPM
Philipp Deppenwiese64e2d192017-10-18 17:13:07 +020074 help
Philipp Deppenwiesec07f8fb2018-02-27 19:40:52 +010075 Certain TPMs seem to need some delay when reading response
76 to work around a race-condition-related issue, possibly
77 caused by ill-programmed TPM firmware.
Philipp Deppenwiese64e2d192017-10-18 17:13:07 +020078
Arthur Heymans6d5fcf42019-10-14 17:06:27 +020079config TPM_STARTUP_IGNORE_POSTINIT
80 bool
81 help
82 Select this to ignore POSTINIT INVALID return codes on TPM
83 startup. This is useful on platforms where a previous stage
84 issued a TPM startup. Examples of use cases are Intel TXT
Angel Pons31b7ee42020-02-17 14:04:28 +010085 or VBOOT on the Intel Arrandale processor, which issues a
Arthur Heymans6d5fcf42019-10-14 17:06:27 +020086 CPU-only reset during the romstage.
87
Bill XIEc79e96b2019-08-22 20:28:36 +080088config TPM_MEASURED_BOOT
89 bool "Enable Measured Boot"
90 default n
91 select VBOOT_LIB
Kyösti Mälkkif303b4f2021-05-27 19:33:57 +030092 depends on TPM
Bill XIEc79e96b2019-08-22 20:28:36 +080093 depends on !VBOOT_RETURN_FROM_VERSTAGE
94 help
95 Enables measured boot (experimental)
96
Sergii Dmytruk97fe17f2022-10-23 00:24:37 +030097choice
98 prompt "TPM event log format"
99 depends on TPM_MEASURED_BOOT
100 default TPM_LOG_CB
101
102config TPM_LOG_CB
103 bool "coreboot's custom format"
104 help
105 Custom coreboot-specific format of the log derived from TPM1 log format.
106
107endchoice
108
Arthur Heymans6f8e9442021-03-29 14:23:53 +0200109config TPM_MEASURED_BOOT_INIT_BOOTBLOCK
110 bool
111 depends on TPM_MEASURED_BOOT && !VBOOT
112 help
113 Initialize TPM inside the bootblock instead of ramstage. This is
114 useful with some form of hardware assisted root of trust
115 measurement like Intel TXT/CBnT.
116
Bill XIEc79e96b2019-08-22 20:28:36 +0800117config TPM_MEASURED_BOOT_RUNTIME_DATA
118 string "Runtime data whitelist"
119 default ""
120 depends on TPM_MEASURED_BOOT
121 help
122 Runtime data whitelist of cbfs filenames. Needs to be a
harshitaae16332020-05-12 12:55:39 +0530123 space delimited list
Bill XIEc79e96b2019-08-22 20:28:36 +0800124
Philipp Deppenwiese64e2d192017-10-18 17:13:07 +0200125endmenu # Trusted Platform Module (tpm)