Commit Graph

613 Commits (e608555ff9bebf5aba2157fedf9bb635ea0c7f60)

Author SHA1 Message Date
Dirk Van Haerenborgh e608555ff9
feat: store wolfboot version in named section 2026-11-02 16:13:09 +01:00
David Garske 80a186f5c5
Merge pull request #953 from bigbrett/tc3-port-tweaks
Monolithic self-update version check + TC3xx/wolfHSM changes
2026-10-30 10:47:03 -07:00
Mattia Moffa 6d79499e45
Merge pull request #962 from dgarske/mpfs250_emmc_qspi
Add PolarFire SoC support for M-Mode (HSS replacement) booting from eMMC and QSPI into DDR
2026-10-29 19:04:07 +01:00
David Garske a8542bd860 hybrid: fix LMS/XMSS keystore import and PQ secondary builds 2026-10-29 07:01:01 +01:00
David Garske 29b5476ead PolarFire SoC: boot the HSS replacement from eMMC and QSPI into DDR 2026-10-28 21:06:08 -07:00
David Garske eca987ba9d
Merge pull request #952 from danielinux/signer-claimed-role-fix
boot: bind image partition claim to the booting core
2026-10-28 14:35:37 -07:00
Brett Nicholas 3c56b4bac0 Make wolfHSM cert chain name constraints optional, updates to support new wolfHSM keygen macro protection, further reducing codesize 2026-10-28 14:25:29 -07:00
Daniele Lacamera c51b353521 boot: bind image partition claim to the booting core
Add wolfBoot_image_part_matches(), which requires the image's claimed
partition id to match HDR_IMG_TYPE_APP.
2026-10-28 14:37:09 +01:00
Daniele Lacamera 76a8b2b3ea Refuse partitions too small for the trailer, add STM32F4 custom trailer (#937) 2026-10-28 14:35:31 +01:00
David Garske ac5d2fe4a0 sdhci: service the watchdog and re-arm the timeout in the SDMA data phase 2026-10-27 16:06:05 -07:00
David Garske e10b343500 PolarFire SoC: SBI vendor extension for the OS: PUF keys, System Controller services and flash access 2026-10-27 16:06:05 -07:00
David Garske 4f0948e11d PolarFire SoC: a FIT ramdisk that must load, and failover actions before the golden boot 2026-10-27 16:06:05 -07:00
Brett Nicholas 8b9fd4ca59 Update docs and comment cleanup 2026-10-27 16:46:40 +01:00
Brett Nicholas 41fbe4b326 Improve support for ECC flash parts:
- Add NVM ECC mode, which introduces a new erase check HAL API to use
   flash controller HW to blank check sectors instead of reading them
   and comparing to an erased byte (which typically triggers an ECC
   fault)
 - Add NVM Journal mode as an alternative to NVM_FLASH_WRITE_ONCE that
   does not require a sector-size RAM buffer and dramatically reduces
   the number of erases and programs required to set individual flags,
   while also being much more robust to power-cuts.
2026-10-27 16:46:40 +01:00
Marco Oliverio b240ee7aaa
Merge pull request #933 from dgarske/nai_68int6
Add wolfBoot target for the NAI 68INT6 (Intel Tiger Lake UP3) OpenVPX SBC
2026-10-26 10:04:12 +01:00
David Garske d490e36d2e fdt: boot a FIT with no kernel load/entry and no device tree 2026-10-23 11:49:49 -07:00
Aidan Garske d284ceedb5 Enable SHA3 on the secure wolfHSM server for the STM32H5 TrustZone port 2026-10-16 17:26:50 +02:00
David Garske 608610dc16 imx95_a55: add the Cortex-A55 target and a stage 1 replacing U-Boot SPL 2026-10-15 15:27:28 -07:00
David Garske 2c2a0438c1 hal: keep BENCHMARK_END valid on a build with printf compiled out 2026-10-15 15:26:59 -07:00
Aidan Garske 1b425abfe8 Add Agilex 5 FCS and wolfBoot integration 2026-10-15 10:25:33 -07:00
David Garske 363483ed54 nai_68int6: add wolfBoot target for the NAI 68INT6 (Intel Tiger Lake UP3) OpenVPX SBC 2026-10-14 21:56:32 -07:00
David Garske aa6fdb8fa9 x86 FSP: add TPM-NV anti-rollback with a persistent version floor and boot audit counters 2026-10-14 21:56:32 -07:00
David Garske 2cb873bd8e x86 FSP: generate ACPI tables (RSDP/XSDT/FADT/MADT/MCFG/DSDT) for the Linux payload 2026-10-14 21:56:32 -07:00
David Garske cd4174ccc9 update_disk: fail closed when the boot-part DTB fixup does not land, and run it on the BL31 handoff 2026-10-07 20:44:28 -07:00
David Garske 339d3a6396 update_disk: tell the OS which slot it booted from via /chosen/wolfboot,boot-part 2026-10-07 20:07:38 -07:00
David Garske 97e895613d tpm: add a TIS-over-I2C transport and a generic I2C driver interface 2026-10-06 18:14:10 +02:00
Daniele Lacamera 35d315a6ff CMake: uniform the WOLFCRYPT_TZ_PSA flags with options.mk; fix version hex 2026-10-01 18:00:54 +02:00
Daniele Lacamera 7b480de33a prepare-release-v2.10.0: release notes and version bump 2026-10-01 15:42:17 +02:00
David Garske bd1bc31ed1 x86 FSP: address review - shared fsp_handle_reset, UART number/mode, always re-hash OS digest 2026-09-30 09:25:16 +02:00
David Garske 3d197cb8c7 x86 FSP: load an optional initrd alongside the Linux bzImage payload 2026-09-30 09:25:16 +02:00
David Garske 12bebb4859 x86 FSP: honour NotifyPhase reset requests, including the Tiger Lake global reset 2026-09-30 09:25:16 +02:00
Daniele Lacamera 42439af739 branch hygiene: 80-col wrap, no one-line ifs, ignore new test binary;
- ramboot_region_overlap in image.h: brace the single-statement ifs
  (house C style) and wrap the 82-col comment line.
- .gitignore: unit-update-flash-db test binary.
2026-09-29 09:47:07 +02:00
Daniele Lacamera e402866164 F-14299: overlap guard in wolfBoot_ram_decrypt
The encrypted RAM load path only bounded the unauthenticated image
length; a bit-flipped header size could drive the decrypt loop over
wolfBoot's own code before the post-decryption signature check. Add
the same destination/wolfBoot overlap check the ramboot loader already
has, and move the ramboot_region_overlap helper to image.h so both
loaders share it.
2026-09-29 08:55:25 +02:00
Daniele Lacamera 410d8de24e F-14283: keep TFM hardening in DICE_HW secure-mode builds
The WOLFBOOT_DICE_HW exception assumed hardware DICE leaves the
secure world verify-only, but only the DICE attestation key runs on
the crypto engine: the secure PSA service still does software RSA/ECC
on keys created or imported through the IPC, so drop the exception and
let every WOLFCRYPT_SECURE_MODE fastmath build define
TFM_TIMING_RESISTANT.
2026-09-29 08:50:44 +02:00
David Garske 8f4578c84e Add optional boot confirmation and rollback for the disk boot path 2026-09-29 07:41:43 +02:00
David Garske 490a3791f9 Fix to keep the FIT DTB's own bootargs unless LINUX_BOOTARGS is explicitly configured 2026-09-24 16:03:12 +02:00
David Garske 23989067ec zynqmp: add non-cacheable DMA window and hal_dma_set_noncached() 2026-09-24 13:27:04 +02:00
Daniele Lacamera 769c3885f0 Remove the obsolete python keytools, convert remaining users to C
sign.py and keygen.py are superseded by the C tools/keytools/sign and
keygen (built by the same Makefile, no python/wolfcrypt-py
dependency). Rewrite unit-sign-delta-tlv.py to sign a real delta
image with the C sign tool instead of the python bmdiff/sign.py
pipeline, and update README.md and include/delta.h references.
2026-09-23 01:48:54 +02:00
Aidan Garske c48a882cd9 Add a generic secure application handoff with a measured boot record 2026-09-22 15:35:42 +02:00
David Garske 7efe6d410f tpm: reject a measured-boot PCR bank wider than the image hash 2026-09-22 15:32:04 +02:00
David Garske 44ce5d8333 tpm: pair the PCR bank algorithm with its digest size 2026-09-22 15:32:04 +02:00
David Garske 4f33091f74 uart: replace the duplicated NS16550 console code with a shared driver 2026-09-21 18:12:32 +02:00
David Garske fae9e53653 hooks: add pre-boot hook, DTB accessor and FDT alias/reg helpers 2026-09-21 18:10:09 +02:00
David Garske 4093fa0e17 Add NXP i.MX 8QuadMax MEK port including BL33 support 2026-09-21 18:07:44 +02:00
Daniele Lacamera 80af0bfd4b Fix CI: partition-guard extents, duplicate nrf5340 object, opt-out reach
Three CI failures from the new bootloader-region overlap guards:

renesas_rx72n: the swap check measured the swap area as a full
WOLFBOOT_PARTITION_SIZE, but swap is one sector (the pre-existing
boot/update-vs-swap guards already use WOLFBOOT_SECTOR_SIZE). On rx72n
that inflated swap to 0xFFFE0000+0x1F0000 and falsely overlapped the
write-protect region at 0xFFFF0000. Use WOLFBOOT_SECTOR_SIZE.
2026-09-18 18:58:39 +02:00
Daniele Lacamera d45f3446c7 Address Copilot review comments
- Add missing END_TEST after each START_TEST in unit-nrf5340-uart-crlf.c
- Fix partition overlap checks in target.h.in to use standard interval
  intersection (catches partitions that start below WOLFBOOT_ORIGIN and
  extend into the bootloader region)
2026-09-18 17:26:22 +02:00
Daniele Lacamera a2f7d8b651 Fix nrf5340 link error + cypsoc6 partition-overlap false positive
nrf5340: the target references nrf5340_uart_crlf (src/update_flash.c)
but the Makefile does not compile hal/nrf5340_uart.c, so the linker
fails. Add the object to OBJS (Makefile) and APP_OBJS (test-app).

cypsoc6: the new boot/update/swap vs bootloader-region #error guards
in include/target.h.in fire on the cypsoc6 layout, where the boot
partition intentionally overlaps the bootloader region (the bootloader
and the boot image share the same flash region). Introduce
WOLFBOOT_ALLOW_PART_OVERLAP (defined in cypsoc6.config, gated in
target.h.in, added to CONFIG_VARS in tools/config.mk) to suppress the
guards for targets that legitimately overlap.

Verified: nrf5340 builds (make distclean + cp config + make, exit 0,
wolfboot.bin created). cypsoc6 cannot be built locally (the CI checks
out lib/psoc6pdl from Infineon, which is not available locally), but
the WOLFBOOT_ALLOW_PART_OVERLAP guard is verified to suppress the
#error for the cypsoc6 layout.
2026-09-18 15:07:34 +02:00
Daniele Lacamera b0db2b70f7 F-13622: guard partition overlap with the bootloader write-protect region
The boot, update and swap partitions were never checked against the
bootloader write-protect region [WOLFBOOT_ORIGIN, WOLFBOOT_ORIGIN +
BOOTLOADER_PARTITION_SIZE). An over-sized BOOTLOADER_PARTITION_SIZE
silently write-protects the head of a partition; the existing
boot/update/swap overlap guards did not cover this.

Add three #error guards (boot, update, swap vs bootloader region) to
include/target.h.in, gated on WOLFBOOT_ORIGIN < the partition address so
they only fire for real targets (the mock target has WOLFBOOT_ORIGIN ==
WOLFBOOT_PARTITION_BOOT_ADDRESS, a valid simplified geometry).

The undersized guard (BOOTLOADER_PARTITION_SIZE not covering the
self-update erase range) is deferred: it requires a compile-time
constant for ARCH_FLASH_OFFSET, which is a runtime value (sim_ram_base)
for the mock target.

The compile-only negative tests (part 2 of the finding) are deferred.
2026-09-18 13:56:15 +02:00
Daniele Lacamera 703065b68f Fix wolfCrypt build and footprint limits after the wolfSSL update
The wolfSSL bump to master 4aa1ad7a5 wraps all of coding.h in
"#ifndef NO_CODING".  That block also holds the auto-enable that turns
WOLFSSL_KEY_GEN into WOLFSSL_BASE64_ENCODE, so wolfBoot configurations
that set both WOLFSSL_KEY_GEN (SECURE_PKCS11) and NO_CODING lost the
Base64_Encode() declaration -- and coding.c compiles to nothing under
NO_CODING, so the definition is gone too.  settings.h still derives
WOLFSSL_DER_TO_PEM from WOLFSSL_KEY_GEN, so asn.c kept compiling
wc_DerToPemEx() and failed with an implicit declaration of
Base64_Encode().  This broke every TrustZone and PKCS11 target.

wolfBoot never emits PEM, so define WOLFSSL_NO_DER_TO_PEM whenever
NO_CODING is set rather than pulling base64 back in.  The check sits
after the HAVE_FIPS block, which may undef NO_CODING.  wolfTPM's
wc_DerToPem() callers are themselves guarded by WOLFSSL_DER_TO_PEM, so
they simply drop their optional PEM encoding path.

Separately, the update grows wolfboot by 8-136 bytes depending on the
configuration, so re-measure every test-size-all entry with the CI
container and record the new sizes.
2026-09-17 19:13:42 +02:00
Daniele Lacamera 5f231a890c Fix: keep wolfBoot API declarations visible to app builds
c3f9717f guarded the success/trigger/sector-flag declarations behind
WOLFBOOT_FIXED_PARTITIONS, but wolfboot.h includes target.h only under
__WOLFBOOT, so test-apps (compiled without __WOLFBOOT) never saw the
macro and failed with implicit-declaration errors on imx95_m7, mcxa,
mcxw and mcxw-tz. Unguard the header declarations; keep the definitions
guarded and move wolfBoot_success out of the fixed-partition guard
since it only uses the partition-state API.
2026-09-16 18:31:59 +02:00