mirror of https://github.com/wolfSSL/wolfTPM.git
Corrected defaults and autodetect.
parent
e95f2647d5
commit
36bbb57f67
|
@ -63,7 +63,9 @@ int TPM2_IoCb(TPM2_CTX* ctx, const byte* txBuf, byte* rxBuf,
|
||||||
## Additional Compiler macros
|
## Additional Compiler macros
|
||||||
|
|
||||||
* `TPM2_SPI_DEV_PATH`: Set to the device string to be opened by the Linux IOCb. Default: "/dev/spidev0."
|
* `TPM2_SPI_DEV_PATH`: Set to the device string to be opened by the Linux IOCb. Default: "/dev/spidev0."
|
||||||
* `TPM2_SPI_DEV_CS`: Set to the number string of the CS to use or the lowest CS to try during autodetect. Default: "0"
|
* `TPM2_SPI_DEV_CS`: Set to the number string of the CS to use. Default: "0"
|
||||||
|
|
||||||
These can be set during configure as:
|
These can be set during configure as:
|
||||||
./configure CPPFLAGS="-DTPM2_SPI_DEV_PATH=\"/dev/spidev0.\" -DTPM2_SPI_DEV_CS=\"0\" "
|
./configure CPPFLAGS="-DTPM2_SPI_DEV_PATH=\"/dev/spidev0.\" -DTPM2_SPI_DEV_CS=\"0\" "
|
||||||
|
|
||||||
|
Note that autodetect will use TPM2_SPI_DEV_PATH[0..4] for the searched device paths.
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
#define TPM2_SPI_DEV_CS "0"
|
#define TPM2_SPI_DEV_CS "0"
|
||||||
#else
|
#else
|
||||||
/* OPTIGA SLB9670/SLB9762 and LetsTrust TPM use CE1 */
|
/* OPTIGA SLB9670/SLB9762 and LetsTrust TPM use CE1 */
|
||||||
#define TPM2_SPI_DEV_CS "0"
|
#define TPM2_SPI_DEV_CS "1"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
#ifdef WOLFTPM_AUTODETECT
|
#ifdef WOLFTPM_AUTODETECT
|
||||||
#undef TPM2_SPI_DEV
|
#undef TPM2_SPI_DEV
|
||||||
/* this will try incrementing spidev chip selects */
|
/* this will try incrementing spidev chip selects */
|
||||||
static char TPM2_SPI_DEV[] = TPM2_SPI_DEV_PATH TPM2_SPI_DEV_CS;
|
static char TPM2_SPI_DEV[] = TPM2_SPI_DEV_PATH "0";
|
||||||
#define MAX_SPI_DEV_CS '4'
|
#define MAX_SPI_DEV_CS '4'
|
||||||
static int foundSpiDev = 0;
|
static int foundSpiDev = 0;
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue