tpm: add a Sandbox TPMv2.x driver
This driver can emulate all the basic functionalities of a TPMv2.x
chip and should behave like them during regular testing.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
diff --git a/drivers/tpm/Kconfig b/drivers/tpm/Kconfig
index 2de9862..93264dd 100644
--- a/drivers/tpm/Kconfig
+++ b/drivers/tpm/Kconfig
@@ -21,7 +21,7 @@
bool "Enable sandbox TPM driver"
depends on TPM_V1 && SANDBOX
help
- This driver emulates a TPM, providing access to base functions
+ This driver emulates a TPMv1.x, providing access to base functions
such as reading and writing TPM private data. This is enough to
support Chrome OS verified boot. Extend functionality is not
implemented.
@@ -129,6 +129,15 @@
if TPM_V2 && !TPM_V1
+config TPM2_TIS_SANDBOX
+ bool "Enable sandbox TPMv2.x driver"
+ depends on TPM_V2 && SANDBOX
+ select TPM_DRIVER_SELECTED
+ help
+ This driver emulates a TPMv2.x, providing access to base functions
+ such as basic configuration, PCR extension and PCR read. Extended
+ functionalities are not implemented.
+
config TPM2_TIS_SPI
bool "Enable support for TPMv2.x SPI chips"
depends on TPM_V2 && DM_SPI