Commit Graph

2984 Commits (b545979da0766f94e41a19ccf40f912ca6b6c9a8)

Author SHA1 Message Date
Thomas Cook b545979da0 address several pr issues 2026-04-27 17:30:42 +02:00
Thomas Cook 8742af6cb4 Turn off lpc55s69 hw accel (PKA) be default 2026-04-27 17:30:42 +02:00
Thomas Cook aa4d9e26d6 Add lauterbach scripts 2026-04-27 17:30:42 +02:00
Thomas Cook 8d3f459d20 Regression test fixes 2026-04-27 17:30:42 +02:00
Thomas Cook 01270723cf turn on other aes algs for test/benchmark 2026-04-27 17:30:42 +02:00
Thomas Cook bba88fba92 fix build flags for hw accel 2026-04-27 17:30:42 +02:00
Thomas Cook e83f61c9db Add benchmark and test capability to test-app 2026-04-27 17:30:42 +02:00
Thomas Cook 8c6d6e2fc6 Better hook rng into wolfCrypt 2026-04-27 17:30:42 +02:00
Thomas Cook f40b01d362 initialize casper for rsa signing 2026-04-27 17:30:42 +02:00
Thomas Cook cf3a7d9da1 Bump up sector size to accomodate rsa4096 2026-04-27 17:30:42 +02:00
Thomas Cook 1f99a356e9 Add hw support for SHA1 and SHA256 2026-04-27 17:30:42 +02:00
David Garske 284a1d5eb9 Peer review fixes 2026-04-27 17:00:41 +02:00
David Garske 980022de13 Add wolfBoot port for STM32U3 (NUCLEO-U385RG-Q)
New HAL port for the STM32U3 family (Cortex-M33, no TrustZone,
1MB dual-bank flash with 4KB pages, 64-bit double-word writes).

Features:
- hal/stm32u3.c, hal/stm32u3.h, hal/stm32u3.ld: flash driver,
  clock init (96 MHz MSIRC0 via EPOD booster), inline UART, ICACHE
- config/examples/stm32u3.config: ECC384/SHA384, DEBUG_UART=1,
  NVM_FLASH_WRITEONCE=1, RAM_CODE=1, dual-bank layout
- test-app/app_stm32u3.c: LED blink + UART output + version check
- tools/scripts/prepare_update_u3.sh: v2 pBOOT update image builder
- docs/Targets.md: STM32U3 section with build/flash/update instructions
- CI: stm32u3_test job + Clang rebuild coverage

Tested on NUCLEO-U385RG-Q:
- Verified boot with ECC384/SHA384 signature
- 96 MHz clock (MSIRC0 + SMPS + EPOD booster + VOS1)
- UART output on USART1 PA9/PA10 (ST-LINK VCP)
- TEST_FLASH erase/write/readback on both flash banks
- A/B firmware update (v1 -> v2 swap with pBOOT trigger)
2026-04-27 17:00:41 +02:00
David Garske 8b7ce4e4dd
Merge pull request #756 from danielinux/fTPM-TZ
Added support for fwTPM in TrustZone + STM32H5 test app
2026-04-22 14:10:19 -07:00
David Garske 3c11bf3f55 Peer review fixes 2026-04-22 19:08:00 +02:00
David Garske 5d71feb4ef PolarFire SoC M-Mode: Fix L2 scratchpad init, QSPI programmer, and add WDT support 2026-04-22 19:08:00 +02:00
Daniele Lacamera c6c254403b Fixed path of config file for fwtpm tests in trustzone 2026-04-22 14:38:59 +02:00
Daniele Lacamera cffa75d4a4 Proper interface renaming + documentation 2026-04-22 14:14:28 +02:00
David Garske bc454d9f4b Peer review fixes 2026-04-22 14:10:55 +02:00
David Garske 00313b3e43 Rename LPC54S018M to LPC54S0XX 2026-04-22 14:10:55 +02:00
David Garske eee953f823 Add tests and improve docs 2026-04-22 14:10:55 +02:00
David Garske 2831b6dadd Expand documentation for the enhaced boot block 2026-04-22 14:10:55 +02:00
David Garske 46deb232ff Fixes for clocks and testing updates. 2026-04-22 14:10:55 +02:00
Aidan Garske 9673509c04 Clean up NXP LPC54S018M port and align with LPC55S69 patterns
- HAL: Remove debug spifi_test_mode_switch(), use wolfBoot_printf
    instead of raw uart_write, add printf.h include
  - Test app: Use check_parts() (was defined but unused), replace
    custom print_str/print_hex32 with wolfBoot_printf, fix LED logic
    to show LED1 for v1 and LED2 for v2+ (was always LED1)
  - Docs: Remove incorrect MCUXpresso SDK section (port is bare-metal),
    fix typo, add swap timing note, add flash script references
  - Build: Add --no-warn-rwx-segments to arch.mk, improve Makefile
    comments
  - Add tools/scripts/nxp-lpc54s018m-flash.sh following the
    nxp-s32k142-flash.sh pattern (build, sign, flash via pyocd)

  Tested: full boot + firmware update cycle (v1 -> v2 swap) verified
  on LPC54S018M-EVK hardware.
2026-04-22 14:10:55 +02:00
Aidan Garske 943d4fd866 Fix NXP LPC54S018M SPIFI flash operations and complete boot+update cycle
The LPC54S018M HAL had three critical SPIFI controller issues preventing
   flash write/erase operations from working, which blocked wolfBoot_success(),
   wolfBoot_update_trigger(), and the firmware swap:

   1. Wrong memory-mode read command: Used opcode 0x6B (Quad Output, serial
      address) but the boot ROM configures 0xEB (Quad I/O, quad address) with
      MCMD=0xEB930000. The mismatch caused garbled address bits when re-entering
      XIP after flash operations, crashing on instruction fetch.

   2. SPIFI POLL mode not waiting: The boot ROM leaves CLIMIT[7:0]=0x00 which
      makes the hardware POLL comparison always succeed immediately. Set
      IDATA=0x00 and CLIMIT[7:0]=0x01 to properly wait for flash BUSY to clear.

   3. SPIFI reset clears CTRL/CLIMIT: The reset used to exit memory mode clears
      the boot ROM's timing config (CTRL=0x600F03E8) and cache limit
      (CLIMIT=0x08000000). Save and restore both registers around every reset.

   Additional changes:
   - Add RAMFUNCTION memcpy (src/string.o) to test app for SPIFI XIP safety
   - Add bare-metal UART driver for Flexcomm0 (non-blocking, skips if FC0
     doesn't respond — observed on some LPC54S018M-EVK boards)
   - Add DSB+ISB barriers after entering memory mode for pipeline coherency
   - Enable DEBUG_UART in example config
   - Update test app to follow LPC55S69 port patterns with LED indicators
     for boot version and update status

   Tested: cold boot, ECC256 signature verify, wolfBoot_success(),
   wolfBoot_update_trigger(), and full v1->v2 firmware swap all working.
   Swap takes ~60 seconds for the 960KB partition (240 sector operations).
2026-04-22 14:10:55 +02:00
David Garske 91145d53bb Add wolfBoot support for NXP LPC54S018M-EVK 2026-04-22 14:10:55 +02:00
Daniele Lacamera b26d38ed41 Fix fTPM NSC bounds handling 2026-04-22 12:22:43 +02:00
Daniele Lacamera 884352cf08 Updated object list to match latest wolfTPM 2026-04-22 12:17:51 +02:00
Daniele Lacamera b22c85ed27 Added support for fTPM in TrustZone + STM32H5 test app 2026-04-21 20:53:48 +02:00
Mattia Moffa 71b395d292
Merge pull request #755 from danielinux/fix-regression-unit-tests-p743
Fix regression in unit test
2026-04-17 13:48:33 +02:00
Daniele Lacamera 32f557c873 Fix regression in unit test 2026-04-17 08:41:51 +02:00
Brett Nicholas 2e7839e4ee add additional check for DELTA_UPDATE + DISABLE_BACKUP incompatibility 2026-04-17 08:27:05 +02:00
Brett Nicholas 2a385eb384 review: fix Makefile conditional 2026-04-17 08:27:05 +02:00
Brett Nicholas ce1f7f13c2 add ci test coverage for monolithic and self-update combined cases 2026-04-17 08:27:05 +02:00
Brett Nicholas c45268ed7f monolithic self-updates: force DISABLE_BACKUP=1, eliminate swap, eliminate update code 2026-04-17 08:27:05 +02:00
Brett Nicholas d387e39a6f address review feedback 2026-04-17 08:25:51 +02:00
Brett Nicholas e5ea4aa0ab add sanity checks on oneshot hash pointers 2026-04-17 08:25:51 +02:00
Brett Nicholas f7ea40f7cc Add oneshot hash build option 2026-04-17 08:25:51 +02:00
David Garske 1253995283
Merge pull request #753 from danielinux/prep-2.8.0
Preparing release v2.8.0 + update copyright
2026-04-16 10:46:53 -07:00
Daniele Lacamera 4f050f2485 Trying to work around broken archive.ubuntu.com mirror 2026-04-16 18:39:39 +02:00
Daniele Lacamera 776378ca78 Preparing release v2.8.0 + update copyright 2026-04-16 13:11:56 +02:00
David Garske 053d16927e
Merge pull request #751 from danielinux/fixes-20260415
Fixes 20260415 - fix finding from static analysis
2026-04-15 18:54:53 -07:00
Daniele Lacamera 73c29622e1 Fixed regression in update_ram tests 2026-04-15 23:22:00 +02:00
Daniele Lacamera 8d9e912fb8 Addressed another round of copilot comments 2026-04-15 20:37:07 +02:00
Daniele Lacamera 90670fcdba Addressed the 3 remaining open Copilot comments. 2026-04-15 19:02:06 +02:00
Daniele Lacamera 0a4f8281a2 Addressed Fenrir's comments 2026-04-15 18:57:13 +02:00
Daniele Lacamera 26552b5aed Addressed copilot's comments 2026-04-15 18:32:25 +02:00
Daniele Lacamera 3118f7ad4e Fixed regression in sim test, added sim test for denied rollback 2026-04-15 18:26:04 +02:00
Daniele Lacamera d4f062a773 tools/tpm: write policy output in binary mode
F/1896
2026-04-15 17:33:37 +02:00
Daniele Lacamera 1359aac80d Block rollback fallback in non-flash update paths
F/2254
2026-04-15 17:31:29 +02:00