Commit Graph

48 Commits (d450a533edd468546efe88fc7f22a79edbdbf9f5)

Author SHA1 Message Date
David Garske 0c52f3be4d Add firmware TPM 2.0 (fwTPM) implementation
Add portable firmware TPM 2.0 implementation (fwTPM) built on wolfCrypt.
Implements 105/113 TPM 2.0 v1.38 commands (93%) as a standalone server
with socket and TIS transports, NV storage, and full CI/fuzz coverage.
2026-04-16 16:57:57 -07:00
David Garske 68ef2f6647
Merge pull request #458 from aidangarske/add-full-spdm-support
wolfTPM SPDM support (Nuvoton NPCT75x and NSING NS350)
2026-04-08 05:36:16 +08:00
David Garske 44788c10c3 Peer review fixes 2026-04-07 10:51:16 -07:00
David Garske 98327eae02 Fix Fenrir F-1227: MMIO register access for multi-byte read/write 2026-04-06 15:58:05 -07:00
Aidan Garske 49c767432f Add Nuvoton NPCT75x and NSING NS350 SPDM support for wolfTPM 2026-03-24 18:15:38 +00:00
aidan garske 2485b2d5b2 Fix 335, 340, 347, 348, 349, 336, 418, 338, 337, 339, 423, 424 2026-03-06 14:22:31 -08:00
Paul Adelsbach 559147c410 Add error returns in TPM2_IoCb_Zephyr_I2C 2026-03-04 13:44:51 -08:00
Aidan Garske 0aefc3b47d Add auto detection on linux 2026-02-24 17:57:52 +00:00
Aidan Garske a014432d04 Fix CI failures 2026-02-20 21:43:29 +00:00
Aidan Garske 978b72fb12 Improve error logging when wolfTPM2_Init fails
Resolves #457. When the SPI device could not be opened (e.g., kernel TPM
  driver owns it), wolfTPM failed silently with no error output. Users had
  no indication of what went wrong or how to fix it.

  Changes:
  - Make TPM2_Init failed message in wolfTPM2_Init_ex always print
    (previously required --enable-debug)
  - Add SPI/I2C open failure logging in hal/tpm_io_linux.c: permission
    denied prints unconditionally, other errors print with DEBUG_WOLFTPM
  - Add autodetect scan exhaustion message (DEBUG_WOLFTPM)
  - Fix examples (caps, wrap_test, bench, pkcs7) that silently returned
    on init failure to print error code and RC string
  - Update 13 other examples to include error code in init failure message
2026-02-20 20:48:25 +00:00
aidan garske d6ba3812a9 Upgrade wolfTPM CI testing 2026-02-16 11:06:33 -08:00
aidan garske 01a2bb2ab1 Add hardware SPI support for Raspberry Pi 4
- Change default TPM_SPI_CS to 1 (CE1/GPIO7) to match official
    Raspberry Pi tpm-slb9670 overlay used by LetsTrust and Infineon HATs
  - Use _spi_get_bus_and_cs() with explicit speed/mode parameters
    for proper SPI device initialization
  - Add required includes for asm/io.h and dm/device-internal.h
  - Improve debug message prefixes for clarity

  Tested on Raspberry Pi 4 with Infineon SLB9672 TPM HAT.
2026-01-23 17:23:30 -08:00
Aidan Garske 1955938612 Update to working version of linux dev with swtpm 2026-01-08 21:27:33 +00:00
Aidan Garske 4fbc680d14 Update tpm_io_uboot.c 2026-01-07 21:59:05 +00:00
gojimmypi e94bc78685
Espressif frame size adjustments, cleanup 2025-12-03 12:17:20 -08:00
gojimmypi a44382c4f3
SPI Stack Adjustment 2025-12-03 09:28:28 -08:00
gojimmypi e7a0eee19d
Add Espressif SPI support 2025-12-03 09:02:38 -08:00
David Garske 1402d0d132 wolfTPM Release v3.9.2 prep. Migrating to GPLv3. 2025-07-30 07:29:31 -07:00
David Garske 6fbb49a94f wolfTPM Release v3.9.0. Updated copyright and version. 2025-05-14 15:31:07 -07:00
Aidan Garske 8b8bd479a4 wolfTPM Zephyr Project Port #395 - Work by @aidangarske, @night1rider, and @dgarske 2025-05-14 13:56:08 -07:00
Aidan Garske f31929609f Rebase wolfTPM Support For Das U-Boot Bootloader 2025-04-25 13:28:09 -07:00
jordan a2fede312f microchip iocb: spelling cleanup. 2025-01-06 13:36:51 -05:00
jordan eb079ee22a Implementation for TPM2_IoCb_MicrochipHarmony_I2C. 2025-01-06 12:29:57 -05:00
David Garske 4b56cfa313 Fix for STM32 GPIO SPI CS control to use pin number as bit offset, not direct. 2024-09-17 09:36:18 -07:00
gojimmypi 4f3b57a6e2 flexibility for I2C_MASTER_NUM, add settings comments 2024-05-13 11:43:33 -07:00
gojimmypi fb19d7a0e1 Initial Infineon I2C TPM support for Espressif ESP32 2024-05-10 14:16:39 -07:00
gojimmypi ec35cef6bd Revise I2C HAL gating logic in tpm_to_infineon 2024-04-30 15:11:51 -07:00
David Garske c98ee9a71e Update copyright date. 2024-04-24 10:42:27 -07:00
David Garske 062cfe9b79 Added Infineon CyHal SPI support. 2024-04-02 09:37:32 -07:00
David Garske 892726e6b5 Added support for Infineon SLB9672/SLB9673 Firmware upgrade (see examples/firmware/README.md)
Added Infineon Modus Toolbox support. See `wolfssl/IDE/Infineon/README.md` for setup instructions.
Added support for Infineon CyHal I2C support.
Added Firmware extraction tool
Added Firmware update example application `examples/firmware/ifx_fw_update`.
Added support for vendor capabilities `TPM_CAP_VENDOR_PROPERTY`.
Added `XSLEEP_MS` macro for firmware update delay.
Added support for getting key group id, operational mode and update counts.
Added support for abandoning an update.
Added support for firmware update done, but not finalized
Fix auto-detect to not define SLB9672/SLB9673.
2024-04-01 17:21:18 -07:00
David Garske b395b65287 Fix for config.h, which should only be included from .c files, not headers. ZD 17473 2024-02-07 14:28:33 -08:00
David Garske fb2ea5b315 Fixes for compiler type warnings. Add `WOLFTPM_NO_LOCK`. Improve STM IO options/logging. 2023-12-20 11:54:02 -08:00
Eric Blankenhorn 60f86edbfc
Merge pull request #314 from dgarske/stm32
Add support for overriding the PORT/PIN for the STM32 Cube HAL
2023-12-08 15:10:20 -06:00
David Garske 09e3550f3b Add support for overriding the PORT/PIN for the STM32 Cube HAL. 2023-12-05 12:07:59 -08:00
David Garske f4077360e8 Fix for HAL IO prototype to match (`TPM2HalIoCb` and `TPM2_IoCb`). 2023-12-04 17:43:16 -08:00
David Garske 5226df34d1 Improve STM HAL I2C performance by adding proper guard delay between wake, write and read. 2023-10-05 14:22:50 -07:00
David Garske 14d766512f Fixes for STM32 I2C. 2023-10-04 15:31:30 -07:00
David Garske b58ac14e64 Sanitize the IO TX/RX buffers (make sure they are zero initialized). 2023-08-07 11:08:02 -07:00
David Garske ab9bf2981b Fixes for MMIO HAL refactor. 2023-06-28 16:00:56 -07:00
David Garske 21638b065a Improve MMIO support to utilize the HAL framework. 2023-06-28 13:39:47 -07:00
Bill Phipps 928bf26dcc Style fixes. 2023-04-19 08:04:27 -07:00
Bill Phipps 36bbb57f67 Corrected defaults and autodetect. 2023-04-18 15:05:44 -07:00
Bill Phipps e95f2647d5 Updated HAL documentation for exposed values 2023-04-18 13:56:15 -07:00
Bill Phipps 052d8f5bc6 Corrected Linux usage of cs_change, added config overrides. 2023-04-18 13:18:33 -07:00
David Garske f2a95f3902 Fix for Microchip Harmony build settings. Rename to `WOLFTPM_MICROCHIP_HARMONY`. Avoids confusion with the TPM 2.0 module ATTPM from Microchip. Now enabled with `WOLFTPM_MICROCHIP` and provides backwards compatibility for `WOLFTPM_MCHP`. The new `WOLFTPM_MICROCHIP` has not been released (was added in PR #251). 2023-02-03 10:49:29 -08:00
David Garske c05bf659c2 Fix broken paths with HAL refactor. Update TLS examples to use latest TLS version (allowing downgrade). 2023-01-20 08:29:53 -08:00
David Garske 219751fcf2 Improve the Microchip SPI IO function. 2023-01-18 14:04:03 -08:00
David Garske 1ea4a591a8 HAL refactor and documentation improvements. Move example HAL implementations into new `hal` directory. Include the example HAL in the library when building. Updated HAL IO documentation. 2023-01-18 12:38:04 -08:00