1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 21da177e4SLinus Torvalds# 31da177e4SLinus Torvalds# TPM device configuration 41da177e4SLinus Torvalds# 51da177e4SLinus Torvalds 67126b75cSJan Engelhardtmenuconfig TCG_TPM 71da177e4SLinus Torvalds tristate "TPM Hardware Support" 87126b75cSJan Engelhardt depends on HAS_IOMEM 92f7d8dbbSPeter Huewe imply SECURITYFS 104bf4b4edSArnd Bergmann select CRYPTO 11c1f92b4bSNayna Jain select CRYPTO_HASH_INFO 12a7f7f624SMasahiro Yamada help 131da177e4SLinus Torvalds If you have a TPM security chip in your system, which 141da177e4SLinus Torvalds implements the Trusted Computing Group's specification, 151da177e4SLinus Torvalds say Yes and it will be accessible from within Linux. For 161da177e4SLinus Torvalds more information see <http://www.trustedcomputinggroup.org>. 171da177e4SLinus Torvalds An implementation of the Trusted Software Stack (TSS), the 181da177e4SLinus Torvalds userspace enablement piece of the specification, can be 191da177e4SLinus Torvalds obtained at: <http://sourceforge.net/projects/trousers>. To 201da177e4SLinus Torvalds compile this driver as a module, choose M here; the module 211da177e4SLinus Torvalds will be called tpm. If unsure, say N. 227f2ab000SRajiv Andrade Notes: 237f2ab000SRajiv Andrade 1) For more TPM drivers enable CONFIG_PNP, CONFIG_ACPI 24ec4a162aSJames Morris and CONFIG_PNPACPI. 257f2ab000SRajiv Andrade 2) Without ACPI enabled, the BIOS event log won't be accessible, 267f2ab000SRajiv Andrade which is required to validate the PCR 0-7 values. 271da177e4SLinus Torvalds 287126b75cSJan Engelhardtif TCG_TPM 297126b75cSJan Engelhardt 30d2add27cSJames Bottomleyconfig TCG_TPM2_HMAC 31d2add27cSJames Bottomley bool "Use HMAC and encrypted transactions on the TPM bus" 324bddf458SJarkko Sakkinen default n 33699e3efdSJames Bottomley select CRYPTO_ECDH 34699e3efdSJames Bottomley select CRYPTO_LIB_AESCFB 35033ee84eSJames Bottomley select CRYPTO_LIB_SHA256 36*2c2615c8SEric Biggers select CRYPTO_LIB_UTILS 37d2add27cSJames Bottomley help 38d2add27cSJames Bottomley Setting this causes us to deploy a scheme which uses request 39d2add27cSJames Bottomley and response HMACs in addition to encryption for 40d2add27cSJames Bottomley communicating with the TPM to prevent or detect bus snooping 41d2add27cSJames Bottomley and interposer attacks (see tpm-security.rst). Saying Y 42d2add27cSJames Bottomley here adds some encryption overhead to all kernel to TPM 43d2add27cSJames Bottomley transactions. 44d2add27cSJames Bottomley 456e592a06SJason Gunthorpeconfig HW_RANDOM_TPM 466e592a06SJason Gunthorpe bool "TPM HW Random Number Generator support" 476e592a06SJason Gunthorpe depends on TCG_TPM && HW_RANDOM && !(TCG_TPM=y && HW_RANDOM=m) 486e592a06SJason Gunthorpe default y 49a7f7f624SMasahiro Yamada help 506e592a06SJason Gunthorpe This setting exposes the TPM's Random Number Generator as a hwrng 516e592a06SJason Gunthorpe device. This allows the kernel to collect randomness from the TPM at 526e592a06SJason Gunthorpe boot, and provides the TPM randomines in /dev/hwrng. 536e592a06SJason Gunthorpe 546e592a06SJason Gunthorpe If unsure, say Y. 556e592a06SJason Gunthorpe 5641a5e1cfSChristophe Ricardconfig TCG_TIS_CORE 5741a5e1cfSChristophe Ricard tristate 58a7f7f624SMasahiro Yamada help 5941a5e1cfSChristophe Ricard TCG TIS TPM core driver. It implements the TPM TCG TIS logic and hooks 6041a5e1cfSChristophe Ricard into the TPM kernel APIs. Physical layers will register against it. 6141a5e1cfSChristophe Ricard 6227084efeSLeendert van Doornconfig TCG_TIS 6344506436SPeter Huewe tristate "TPM Interface Specification 1.2 Interface / TPM 2.0 FIFO Interface" 64420d4398SJason Gunthorpe depends on X86 || OF 6541a5e1cfSChristophe Ricard select TCG_TIS_CORE 66a7f7f624SMasahiro Yamada help 6727084efeSLeendert van Doorn If you have a TPM security chip that is compliant with the 6844506436SPeter Huewe TCG TIS 1.2 TPM specification (TPM1.2) or the TCG PTP FIFO 6944506436SPeter Huewe specification (TPM2.0) say Yes and it will be accessible from 7044506436SPeter Huewe within Linux. To compile this driver as a module, choose M here; 7144506436SPeter Huewe the module will be called tpm_tis. 7227084efeSLeendert van Doorn 730edbfea5SChristophe Ricardconfig TCG_TIS_SPI 740edbfea5SChristophe Ricard tristate "TPM Interface Specification 1.3 Interface / TPM 2.0 FIFO Interface - (SPI)" 750edbfea5SChristophe Ricard depends on SPI 760edbfea5SChristophe Ricard select TCG_TIS_CORE 77a7f7f624SMasahiro Yamada help 780edbfea5SChristophe Ricard If you have a TPM security chip which is connected to a regular, 790edbfea5SChristophe Ricard non-tcg SPI master (i.e. most embedded platforms) that is compliant with the 800edbfea5SChristophe Ricard TCG TIS 1.3 TPM specification (TPM1.2) or the TCG PTP FIFO 810edbfea5SChristophe Ricard specification (TPM2.0) say Yes and it will be accessible from 820edbfea5SChristophe Ricard within Linux. To compile this driver as a module, choose M here; 830edbfea5SChristophe Ricard the module will be called tpm_tis_spi. 840edbfea5SChristophe Ricard 85797c0113SAndrey Proninconfig TCG_TIS_SPI_CR50 86797c0113SAndrey Pronin bool "Cr50 SPI Interface" 87797c0113SAndrey Pronin depends on TCG_TIS_SPI 88797c0113SAndrey Pronin help 89797c0113SAndrey Pronin If you have a H1 secure module running Cr50 firmware on SPI bus, 90797c0113SAndrey Pronin say Yes and it will be accessible from within Linux. 91797c0113SAndrey Pronin 92bbc23a07SAlexander Steffenconfig TCG_TIS_I2C 93bbc23a07SAlexander Steffen tristate "TPM Interface Specification 1.3 Interface / TPM 2.0 FIFO Interface - (I2C - generic)" 94bbc23a07SAlexander Steffen depends on I2C 95bbc23a07SAlexander Steffen select CRC_CCITT 96bbc23a07SAlexander Steffen select TCG_TIS_CORE 97bbc23a07SAlexander Steffen help 98bbc23a07SAlexander Steffen If you have a TPM security chip, compliant with the TCG TPM PTP 99bbc23a07SAlexander Steffen (I2C interface) specification and connected to an I2C bus master, 100bbc23a07SAlexander Steffen say Yes and it will be accessible from within Linux. 101bbc23a07SAlexander Steffen To compile this driver as a module, choose M here; 102bbc23a07SAlexander Steffen the module will be called tpm_tis_i2c. 103bbc23a07SAlexander Steffen 104d5ae56a4SMasahisa Kojimaconfig TCG_TIS_SYNQUACER 105d5ae56a4SMasahisa Kojima tristate "TPM Interface Specification 1.2 Interface / TPM 2.0 FIFO Interface (MMIO - SynQuacer)" 1064091c004SCai Huoqing depends on ARCH_SYNQUACER || COMPILE_TEST 107d5ae56a4SMasahisa Kojima select TCG_TIS_CORE 108d5ae56a4SMasahisa Kojima help 109d5ae56a4SMasahisa Kojima If you have a TPM security chip that is compliant with the 110d5ae56a4SMasahisa Kojima TCG TIS 1.2 TPM specification (TPM1.2) or the TCG PTP FIFO 111d5ae56a4SMasahisa Kojima specification (TPM2.0) say Yes and it will be accessible from 112d5ae56a4SMasahisa Kojima within Linux on Socionext SynQuacer platform. 113d5ae56a4SMasahisa Kojima To compile this driver as a module, choose M here; 114d5ae56a4SMasahisa Kojima the module will be called tpm_tis_synquacer. 115d5ae56a4SMasahisa Kojima 1163a253caaSDuncan Laurieconfig TCG_TIS_I2C_CR50 1173a253caaSDuncan Laurie tristate "TPM Interface Specification 2.0 Interface (I2C - CR50)" 1183a253caaSDuncan Laurie depends on I2C 1193a253caaSDuncan Laurie help 1203a253caaSDuncan Laurie This is a driver for the Google cr50 I2C TPM interface which is a 1213a253caaSDuncan Laurie custom microcontroller and requires a custom i2c protocol interface 1223a253caaSDuncan Laurie to handle the limitations of the hardware. To compile this driver 1233a253caaSDuncan Laurie as a module, choose M here; the module will be called tcg_tis_i2c_cr50. 1243a253caaSDuncan Laurie 125a2871c62SJason Gunthorpeconfig TCG_TIS_I2C_ATMEL 126a2871c62SJason Gunthorpe tristate "TPM Interface Specification 1.2 Interface (I2C - Atmel)" 127a2871c62SJason Gunthorpe depends on I2C 128a7f7f624SMasahiro Yamada help 129a2871c62SJason Gunthorpe If you have an Atmel I2C TPM security chip say Yes and it will be 130a2871c62SJason Gunthorpe accessible from within Linux. 131a2871c62SJason Gunthorpe To compile this driver as a module, choose M here; the module will 132a2871c62SJason Gunthorpe be called tpm_tis_i2c_atmel. 133a2871c62SJason Gunthorpe 134aad628c1SPeter Hueweconfig TCG_TIS_I2C_INFINEON 135aad628c1SPeter Huewe tristate "TPM Interface Specification 1.2 Interface (I2C - Infineon)" 136aad628c1SPeter Huewe depends on I2C 137a7f7f624SMasahiro Yamada help 138aad628c1SPeter Huewe If you have a TPM security chip that is compliant with the 139aad628c1SPeter Huewe TCG TIS 1.2 TPM specification and Infineon's I2C Protocol Stack 140aad628c1SPeter Huewe Specification 0.20 say Yes and it will be accessible from within 141aad628c1SPeter Huewe Linux. 142aad628c1SPeter Huewe To compile this driver as a module, choose M here; the module 143b3f2436aSPeter Huewe will be called tpm_i2c_infineon. 144aad628c1SPeter Huewe 1454c336e4bSJason Gunthorpeconfig TCG_TIS_I2C_NUVOTON 1464c336e4bSJason Gunthorpe tristate "TPM Interface Specification 1.2 Interface (I2C - Nuvoton)" 1474c336e4bSJason Gunthorpe depends on I2C 148a7f7f624SMasahiro Yamada help 1494c336e4bSJason Gunthorpe If you have a TPM security chip with an I2C interface from 1504c336e4bSJason Gunthorpe Nuvoton Technology Corp. say Yes and it will be accessible 1514c336e4bSJason Gunthorpe from within Linux. 1524c336e4bSJason Gunthorpe To compile this driver as a module, choose M here; the module 1534c336e4bSJason Gunthorpe will be called tpm_i2c_nuvoton. 1544c336e4bSJason Gunthorpe 1551da177e4SLinus Torvaldsconfig TCG_NSC 1561da177e4SLinus Torvalds tristate "National Semiconductor TPM Interface" 1572f592f2aSRajiv Andrade depends on X86 158a7f7f624SMasahiro Yamada help 1593dde6ad8SDavid Sterba If you have a TPM security chip from National Semiconductor 1601da177e4SLinus Torvalds say Yes and it will be accessible from within Linux. To 1611da177e4SLinus Torvalds compile this driver as a module, choose M here; the module 1621da177e4SLinus Torvalds will be called tpm_nsc. 1631da177e4SLinus Torvalds 1641da177e4SLinus Torvaldsconfig TCG_ATMEL 1651da177e4SLinus Torvalds tristate "Atmel TPM Interface" 1665578b434SRob Herring (Arm) depends on HAS_IOPORT_MAP 16761551536SNiklas Schnelle depends on HAS_IOPORT 168a7f7f624SMasahiro Yamada help 1691da177e4SLinus Torvalds If you have a TPM security chip from Atmel say Yes and it 1701da177e4SLinus Torvalds will be accessible from within Linux. To compile this driver 1711da177e4SLinus Torvalds as a module, choose M here; the module will be called tpm_atmel. 1721da177e4SLinus Torvalds 173ebb81fdbSMarcel Selhorstconfig TCG_INFINEON 174f9abb020SMarcel Selhorst tristate "Infineon Technologies TPM Interface" 1758516b23aSNiklas Schnelle depends on PNP || COMPILE_TEST 176a7f7f624SMasahiro Yamada help 177ebb81fdbSMarcel Selhorst If you have a TPM security chip from Infineon Technologies 178f9abb020SMarcel Selhorst (either SLD 9630 TT 1.1 or SLB 9635 TT 1.2) say Yes and it 179f9abb020SMarcel Selhorst will be accessible from within Linux. 180f9abb020SMarcel Selhorst To compile this driver as a module, choose M here; the module 181ebb81fdbSMarcel Selhorst will be called tpm_infineon. 182ebb81fdbSMarcel Selhorst Further information on this driver and the supported hardware 183631dd1a8SJustin P. Mattock can be found at http://www.trust.rub.de/projects/linux-device-driver-infineon-tpm/ 184ebb81fdbSMarcel Selhorst 185132f7629SAshley Laiconfig TCG_IBMVTPM 186132f7629SAshley Lai tristate "IBM VTPM Interface" 1875b266032SKent Yoder depends on PPC_PSERIES 188a7f7f624SMasahiro Yamada help 189132f7629SAshley Lai If you have IBM virtual TPM (VTPM) support say Yes and it 190132f7629SAshley Lai will be accessible from within Linux. To compile this driver 191132f7629SAshley Lai as a module, choose M here; the module will be called tpm_ibmvtpm. 192132f7629SAshley Lai 1935c83b07dSQunqin Zhaoconfig TCG_LOONGSON 1945c83b07dSQunqin Zhao tristate "Loongson TPM Interface" 1955c83b07dSQunqin Zhao depends on MFD_LOONGSON_SE 1965c83b07dSQunqin Zhao help 1975c83b07dSQunqin Zhao If you want to make Loongson TPM support available, say Yes and 1985c83b07dSQunqin Zhao it will be accessible from within Linux. To compile this 1995c83b07dSQunqin Zhao driver as a module, choose M here; the module will be called 2005c83b07dSQunqin Zhao tpm_loongson. 2015c83b07dSQunqin Zhao 202e2683957SDaniel De Graafconfig TCG_XEN 203e2683957SDaniel De Graaf tristate "XEN TPM Interface" 204e2683957SDaniel De Graaf depends on TCG_TPM && XEN 205713efcabSKonrad Rzeszutek Wilk select XEN_XENBUS_FRONTEND 206a7f7f624SMasahiro Yamada help 207e2683957SDaniel De Graaf If you want to make TPM support available to a Xen user domain, 208e2683957SDaniel De Graaf say Yes and it will be accessible from within Linux. See 209e2683957SDaniel De Graaf the manpages for xl, xl.conf, and docs/misc/vtpm.txt in 210e2683957SDaniel De Graaf the Xen source repository for more details. 211e2683957SDaniel De Graaf To compile this driver as a module, choose M here; the module 212e2683957SDaniel De Graaf will be called xen-tpmfront. 213e2683957SDaniel De Graaf 21430fc8d13SJarkko Sakkinenconfig TCG_CRB 21530fc8d13SJarkko Sakkinen tristate "TPM 2.0 CRB Interface" 21608eff49dSJiandi An depends on ACPI 217a7f7f624SMasahiro Yamada help 21830fc8d13SJarkko Sakkinen If you have a TPM security chip that is compliant with the 21930fc8d13SJarkko Sakkinen TCG CRB 2.0 TPM specification say Yes and it will be accessible 22030fc8d13SJarkko Sakkinen from within Linux. To compile this driver as a module, choose 22130fc8d13SJarkko Sakkinen M here; the module will be called tpm_crb. 22230fc8d13SJarkko Sakkinen 223eb93f073SStuart Yoderconfig TCG_ARM_CRB_FFA 224eb93f073SStuart Yoder tristate "TPM CRB over Arm FF-A Transport" 225eb93f073SStuart Yoder depends on ARM_FFA_TRANSPORT && TCG_CRB 226eb93f073SStuart Yoder default TCG_CRB 227eb93f073SStuart Yoder help 228eb93f073SStuart Yoder If the Arm FF-A transport is used to access the TPM say Yes. 229eb93f073SStuart Yoder To compile this driver as a module, choose M here; the module 230eb93f073SStuart Yoder will be called tpm_crb_ffa. 231eb93f073SStuart Yoder 2326f99612eSStefan Bergerconfig TCG_VTPM_PROXY 2336f99612eSStefan Berger tristate "VTPM Proxy Interface" 2346f99612eSStefan Berger depends on TCG_TPM 235a7f7f624SMasahiro Yamada help 2366f99612eSStefan Berger This driver proxies for an emulated TPM (vTPM) running in userspace. 2376f99612eSStefan Berger A device /dev/vtpmx is provided that creates a device pair 2386f99612eSStefan Berger /dev/vtpmX and a server-side file descriptor on which the vTPM 2396f99612eSStefan Berger can receive commands. 2406f99612eSStefan Berger 24109e57483SSasha Levinconfig TCG_FTPM_TEE 24209e57483SSasha Levin tristate "TEE based fTPM Interface" 24309e57483SSasha Levin depends on TEE && OPTEE 24409e57483SSasha Levin help 24509e57483SSasha Levin This driver proxies for firmware TPM running in TEE. 2466f99612eSStefan Berger 24793b7c6b3SStefano Garzarellaconfig TCG_SVSM 24893b7c6b3SStefano Garzarella tristate "SNP SVSM vTPM interface" 24993b7c6b3SStefano Garzarella depends on AMD_MEM_ENCRYPT 25093b7c6b3SStefano Garzarella help 25193b7c6b3SStefano Garzarella This is a driver for the AMD SVSM vTPM protocol that a SEV-SNP guest 25293b7c6b3SStefano Garzarella OS can use to discover and talk to a vTPM emulated by the Secure VM 25393b7c6b3SStefano Garzarella Service Module (SVSM) in the guest context, but at a more privileged 25493b7c6b3SStefano Garzarella level (usually VMPL0). To compile this driver as a module, choose M 25593b7c6b3SStefano Garzarella here; the module will be called tpm_svsm. 25693b7c6b3SStefano Garzarella 257bf38b871SChristophe Ricardsource "drivers/char/tpm/st33zp24/Kconfig" 2587126b75cSJan Engelhardtendif # TCG_TPM 259