wolfBoot
wolfBoot is a secure bootloader for microcontrollers. I added ports for several boards, hardened TrustZone isolation on the LPC55S69, and fixed power cut bugs in the shared update code.
Main changes
- Added the STM32N6 port with a Cortex-M55 build, XSPI2 flash and a flash script.#720
- Added the NXP FRDM-RW612 port with TrustZone and ML-DSA, and ran NXP HAL tests on the real SDK headers.#926
- Added NXP i.MX RT700 support with a RAM-resident XSPI0 flash driver.#908
- Hardened LPC55S69 TrustZone isolation so the non-secure app reaches only what it needs.#950
- Brought PSoC 6 to parity and fixed two power cut bugs in shared update code.#975
One design choice
Rollback used to be decided before the swap by comparing BOOT and UPDATE versions. After a power cut, a resumed swap read half swapped headers. I moved the decision to after the swap, when UPDATE holds the image that was in BOOT, and the final erase writes SUCCESS directly.
A bug I fixed
On PSoC 6, update images read from QSPI flash sometimes failed their hash. The SMIF clock came from CLK_PATH0, the FLL, which wolfBoot never configures and which was left unlocked after programming. I sourced it from the PLL divided by 8. Under CPU load the update test failed 3 of 4 runs before and passed every run after. (#975)
How it was checked
| PR | Evidence |
|---|---|
| #975 | Before the fix, 6918 of 7272 rollback cut points failed in the default layout. |
| #926 | unit-rw612-flash 14/14, unit-rw612-tz 12/12, unit-flash-write-mcxa 6/6 against the fetched SDK. |
| #950 | 13 secure addresses fault from the non-secure app; benchmark config 31/31. |
What is not done yet
The STM32N6 port is validated by cold boot on one board and one flash part. PSoC 6 needs NO_MPU=1 because of a ROM flash NMI lockup.
All my merged pull requests 20 in wolfSSL/wolfBoot
- #1004Bump wolfSSL submodule for the one-shot HMAC API wolfHSM needs
- #975PSoC 6 parity and CY8CEVAL-062S2 support, with two core power cut fixes
- #987Add an STM32L5 secure application handoff for wolfTrust
- #979Run the macOS CMake build on macos-latest
- #950Harden LPC55S69 TrustZone isolation and add tests, CI and docs
- #948Add an MCXN947 secure application handoff config
- #911Enable SHA3 on the secure wolfHSM server for the STM32H5 TrustZone port
- #846Add Agilex 5 FCS and wolfBoot integration
- #930Add nRF54LM20 support and fix nRF54L RAM code, keyvault, and cache
- #934Harden the NXP MCX W71 port and add console, timer, and wolfCrypt-TZ
- #926Add NXP FRDM-RW612 port and test NXP HALs against the real MCUXpresso SDK
- #908Add NXP i.MX RT700 (MIMXRT798S) support
- #906Add a generic secure application handoff for authenticated boot
- #896Update wolfTPM submodule to v4.2.0
- #831wolfBoot DICE attestation with wolfCOSE
- #819Fix XSPI FIFO indexing, PIC32 PFSWAP toggle, and small-stack key zeroize
- #823wolfBoot hardening: PCI BAR restore, DICE zeroization, FIT bounds, and CT-compare fixes
- #769Add WOLFCRYPT_TZ_WOLFHSM TrustZone engine for STM32H5
- #720Add wolfBoot port for STM32N6 (NUCLEO-N657X0-Q)
- #656Add Image Inspection Functionality to boot_status.py