Infineon SLB9672 support.

pull/214/head
David Garske 2021-08-31 13:38:04 -07:00
parent 1b6bdd5a11
commit a22277a07d
4 changed files with 19 additions and 15 deletions

View File

@ -7,7 +7,7 @@ Portable TPM 2.0 project designed for embedded use.
* This implementation provides all TPM 2.0 APIs in compliance with the specification.
* Wrappers provided to simplify Key Generation/Loading, RSA encrypt/decrypt, ECC sign/verify, ECDH, NV, Hashing/Hmac and AES.
* Testing done using the STM ST33TP* SPI/I2C, Infineon OPTIGA SLB9670, Microchip ATTPM20 TPM 2.0 modules and Nuvoton NPCT650.
* Testing done using the STM ST33TP* SPI/I2C, Infineon OPTIGA SLB9670/SLB9672, Microchip ATTPM20 TPM 2.0 modules and Nuvoton NPCT650.
* wolfTPM uses the TPM Interface Specification (TIS) to communicate over SPI.
* wolfTPM can also use the Linux TPM kernel interface (/dev/tpmX) to talk with any physical TPM on SPI, I2C and even LPC bus.
* Platform support for Raspberry Pi, STM32 with CubeMX, Atmel ASF and Barebox.
@ -74,7 +74,7 @@ There are examples here for Linux, STM32 CubeMX, Atmel ASF and BareBox. The adva
Tested with:
* Infineon OPTIGA (TM) Trusted Platform Module 2.0 SLB 9670.
* Infineon OPTIGA (TM) Trusted Platform Module 2.0 SLB 9670 and SLB9672.
- LetsTrust: [http://letstrust.de] (<https://buyzero.de/collections/andere-platinen/products/letstrust-hardware-tpm-trusted-platform-module).> Compact Raspberry Pi TPM 2.0 board based on Infineon SLB 9670.
* ST ST33TP* TPM 2.0 module (SPI and I2C)
* Microchip ATTPM20 module
@ -83,9 +83,13 @@ Tested with:
#### Device Identification
Infineon SLB9670:
TIS: TPM2: Caps 0x30000697, Did 0x001b, Vid 0x15d1, Rid 0x10
TPM2: Caps 0x30000697, Did 0x001b, Vid 0x15d1, Rid 0x10
Mfg IFX (1), Vendor SLB9670, Fw 7.85 (4555), FIPS 140-2 1, CC-EAL4 1
Infineon SLB9672:
TPM2: Caps 0x30000697, Did 0x001d, Vid 0x15d1, Rid 0x36
Mfg IFX (1), Vendor SLB9672, Fw 16.10 (0x4068), FIPS 140-2 1, CC-EAL4 1
ST ST33TP SPI
TPM2: Caps 0x1a7e2882, Did 0x0000, Vid 0x104a, Rid 0x4e
Mfg STM (2), Vendor , Fw 74.8 (1151341959), FIPS 140-2 1, CC-EAL4 0
@ -138,7 +142,7 @@ autogen.sh requires: automake and libtool: `sudo apt-get install automake libtoo
--enable-tislock Enable Linux Named Semaphore for locking access to SPI device for concurrent access between processes - WOLFTPM_TIS_LOCK
--enable-autodetect Enable Runtime Module Detection (default: enable - when no module specified) - WOLFTPM_AUTODETECT
--enable-infineon Enable Infineon SLB9670 TPM Support (default: disabled)
--enable-infineon Enable Infineon SLB9670/SLB9672 TPM Support (default: disabled)
--enable-st Enable ST ST33TPM Support (default: disabled) - WOLFTPM_ST33
--enable-microchip Enable Microchip ATTPM20 Support (default: disabled) - WOLFTPM_MCHP
--enable-nuvoton Enable Nuvoton NPCT65x/NPCT75x Support (default: disabled) - WOLFTPM_NUVOTON
@ -153,7 +157,7 @@ TLS_BENCH_MODE Enables TLS benchmarking mode.
NO_TPM_BENCH Disables the TPM benchmarking example.
```
### Building Infineon SLB9670
### Building Infineon SLB9670/SLB9672
Build wolfTPM:
@ -161,7 +165,7 @@ Build wolfTPM:
git clone https://github.com/wolfSSL/wolfTPM.git
cd wolfTPM
./autogen.sh
./configure
./configure --enable-infineon
make
```

View File

@ -304,15 +304,15 @@ then
AM_CFLAGS="$AM_CFLAGS -DWOLFTPM_NUVOTON"
fi
# Infineon SLB9670
# Infineon SLB9670/SLB9672
AC_ARG_ENABLE([infineon],
[AS_HELP_STRING([--enable-infineon],[Enable Infineon SLB9670 TPM Support (default: disabled)])],
[AS_HELP_STRING([--enable-infineon],[Enable Infineon SLB9670/SLB9672 TPM Support (default: disabled)])],
[ ENABLED_INFINEON=$enableval ],
[ ENABLED_INFINEON=no ]
)
if test "x$ENABLED_INFINEON" = "xyes"
then
AM_CFLAGS="$AM_CFLAGS -DWOLFTPM_SLB9670"
AM_CFLAGS="$AM_CFLAGS -DWOLFTPM_SLB9670 -DWOLFTPM_SLB9672"
fi
@ -400,7 +400,7 @@ AM_CONDITIONAL([BUILD_WRAPPER], [test "x$ENABLED_WRAPPER" = "xyes"])
AM_CONDITIONAL([HAVE_LIBWOLFSSL], [test "x$ENABLED_WOLFCRYPT" = "xyes"])
AM_CONDITIONAL([BUILD_I2C], [test "x$ENABLED_I2C" = "xyes"])
AM_CONDITIONAL([BUILD_ADVIO], [test "x$ENABLED_ADVIO" = "xyes"])
AM_CONDITIONAL([BUILD_ST], [test "x$ENABLED_ST33" = "xyes"])
AM_CONDITIONAL([BUILD_ST], [test "x$ENABLED_ST" = "xyes"])
AM_CONDITIONAL([BUILD_MICROCHIP], [test "x$ENABLED_MICROCHIP" = "xyes"])
AM_CONDITIONAL([BUILD_INFINEON], [test "x$ENABLED_INFINEON" = "xyes"])
AM_CONDITIONAL([BUILD_DEVTPM], [test "x$ENABLED_DEVTPM" = "xyes"])
@ -528,8 +528,8 @@ echo " * SWTPM: $ENABLED_SWTPM"
echo " * WINAPI: $ENABLED_WINAPI"
echo " * TIS/SPI Check Wait State: $ENABLED_CHECKWAITSTATE"
echo " * Infineon SLB9670 $ENABLED_INFINEON"
echo " * STM ST33: $ENABLED_ST33"
echo " * Infineon SLB967X $ENABLED_INFINEON"
echo " * STM ST33: $ENABLED_ST"
echo " * Microchip ATTPM20: $ENABLED_MICROCHIP"
echo " * Nuvoton NPCT75x: $ENABLED_NUVOTON"

View File

@ -78,7 +78,7 @@
/* Nuvoton NPCT75x uses CE0 */
#define TPM2_SPI_DEV_CS "0"
#else
/* OPTIGA SLB9670 and LetsTrust TPM use CE1 */
/* OPTIGA SLB9670/SLB9762 and LetsTrust TPM use CE1 */
#define TPM2_SPI_DEV_CS "1"
#endif

View File

@ -202,6 +202,7 @@ typedef int64_t INT64;
/* Infineon SLB9670 TPM 2.0 (default) */
/* #define WOLFTPM_SLB9670 */
/* #define WOLFTPM_SLB9672 */
/* Define a default chip */
#if !defined(WOLFTPM_ST33) && !defined(WOLFTPM_MCHP) && \
@ -209,7 +210,6 @@ typedef int64_t INT64;
#define WOLFTPM_SLB9670
#endif
/* Chip Specific Settings */
#ifdef WOLFTPM_MCHP
/* Microchip ATTPM20 */
@ -245,7 +245,7 @@ typedef int64_t INT64;
#define TPM2_SPI_MAX_HZ TPM2_SPI_MAX_HZ_NUVOTON
#endif
#else
/* Infineon OPTIGA SLB9670 */
/* Infineon OPTIGA SLB9670/SLB9672 */
/* Max: 43MHz */
#define TPM2_SPI_MAX_HZ_INFINEON 43000000
#ifndef TPM2_SPI_MAX_HZ