Commit Graph

418 Commits (24841a0eb86cf3754cc206fdf1a573aeaa0edeea)

Author SHA1 Message Date
David Garske d92053037c Fixes from peer review (Thank you Daniele and Marco) 2026-05-05 10:16:16 +02:00
David Garske 85fb32b1dd Fixes from peer review. Thank you Alex 2026-05-05 10:16:16 +02:00
David Garske afb9389c1d Peer review fixes 2026-05-05 10:16:16 +02:00
David Garske 5c29938ba3 docs: document FIT compressed and ramdisk paths for ZynqMP/Versal/PolarFire
PolarFire MPFS250, Versal VMK180, and ZynqMP "Booting PetaLinux"
walkthroughs now describe both options for handing PetaLinux off through
the FIT image:

  * Option A (default GZIP=1): set compression="gzip" in the .its,
    point data at Image.gz / linux.bin.gz, and let mkimage build the
    FIT directly. wolfBoot decompresses straight to the kernel load
    address at boot and verifies hash-1.
  * Option B (GZIP=0): keep the existing host-side gzip -cdvk /
    gunzip step and compression="none" in the .its.

ZynqMP also gains a "FIT ramdisk (initramfs)" subsection covering
RAMDISK=1, WOLFBOOT_LOAD_RAMDISK_ADDRESS, the commented-out opt-in
block in zynqmp_sdcard.config, gzip ramdisk support, and a sample ITS
layout with kernel + DTB + ramdisk subimages.
2026-05-05 10:16:16 +02:00
David Garske cbaecdd5d8 Peer review fixes + ZynqMP robustness improvements
hal/zynq.c:
  - Route IOU_TAPDLY_BYPASS writes through pmu_request at EL<=2 in the
    <=40 MHz and <=100 MHz branches (previously only done at <=150 MHz);
    the register is equally unwritable from EL2/EL1 at lower clocks.
  - Add qspi_flash_reset() (RESET_ENABLE 0x66 + RESET_MEMORY 0x99),
    called per chip in qspi_init so the flash starts from a known state
    regardless of what FSBL/BootROM left behind (XIP, 4-byte addr,
    auto-boot).
  - Drop unused 'reg' in csu_aes and 'ms' in csu_init so
    -Werror=unused-variable builds (OPTIMIZATION_LEVEL=0 / DEBUG=1) pass.

hal/zynq.ld:
  - Move wolfBoot ORIGIN from 0x08000000 to 0x10000000. Large FIT images
    (kernel load=0x00200000, payload >~126 MB) would sweep across
    0x08000000 at handoff and overwrite wolfBoot's own code.

tools/scripts/zcu102/zcu102-ca53-qspi.cmm:
  - Rewrite against the Lauterbach TRACE32 ZCU102 QSPI demo: PREPAREONLY
    entry mode, single/dual toggle, READ_ID_TEST, separate flash dialogs
    for BOOT.BIN (offset 0) and test-app/image_v1_signed.bin.
  - Document the ~128 MB TRACE32 temp-memory ceiling on FLASHFILE.Create:
    larger files must be split externally and loaded in chunks.
2026-04-28 14:55:06 +02:00
David Garske f2fe1f42fa ZynqMP ZCU102 SD-card boot fixes 2026-04-28 14:55:06 +02:00
David Garske c2f187dadd ZynqMP ZCU102 SD-card Linux boot: EL2 cleanup, DTS bootargs, SDHCI init
Add the pieces needed to boot Linux end-to-end from the ZCU102 SD card
with wolfBoot at EL2:

* src/boot_aarch64_start.S: new el2_flush_and_disable_mmu helper that
  cleans D-cache to PoC, invalidates I-cache to PoU, and clears
  SCTLR_EL2.{M,C,I}, then returns. Satisfies the ARM64 Linux boot
  protocol and is also correct for any other payload that sets up its
  own translation (hypervisor, RTOS, later bootloader stage).
* src/boot_aarch64.c: call el2_flush_and_disable_mmu from do_boot() on
  the EL2 direct-jump path before falling through to the br x4 block.
  Also pull in hal/zynq.h and hal/nxp_ls1028a.h so the EL_HYPERVISOR /
  BOOT_EL1 guards compile for those targets.
* hal/zynq.c: implement hal_dts_fixup() — set /chosen/bootargs from
  LINUX_BOOTARGS (with a LINUX_BOOTARGS_ROOT default of /dev/mmcblk0p4)
  and grow DTB totalsize by 512 bytes to give fdt_setprop() headroom
  (matches hal/versal.c). Add hal_get_timer_us() via CNTPCT_EL0.
* src/sdhci.c: add a 1 ms settling delay after sdhci_platform_init()
  and a CMD0 retry loop (up to 10 x 10 ms) so the ZCU102 Arasan
  controller reliably detects the card after the slot-type change +
  soft reset.
* config/examples/zynqmp_sdcard.config: stay at EL2 by default (comment
  out BOOT_EL1), default rootfs to /dev/mmcblk0p4, turn DEBUG off.
* hal/versal.c: correct the default LINUX_BOOTARGS_ROOT to
  /dev/mmcblk0p4 to match the shipped MBR layout.
* docs/Targets.md: note the unconditional EL2 cleanup in the ZynqMP
  and Versal SD-card sections.

Behavior change: non-Linux AArch64 EL2 payloads now enter with MMU
off and caches clean instead of inheriting wolfBoot's tables. No
in-tree payload relies on the old state leakage.
2026-04-28 14:55:06 +02:00
Thomas Cook 65be872436 Some doc updates. 2026-04-27 17:30:42 +02:00
Thomas Cook 994fe009de Update target doc 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 cffa75d4a4 Proper interface renaming + documentation 2026-04-22 14:14:28 +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
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
David Garske 91145d53bb Add wolfBoot support for NXP LPC54S018M-EVK 2026-04-22 14:10:55 +02:00
Brett Nicholas f7ea40f7cc Add oneshot hash build option 2026-04-17 08:25:51 +02:00
Daniele Lacamera 776378ca78 Preparing release v2.8.0 + update copyright 2026-04-16 13:11:56 +02:00
Daniele Lacamera b705ca74ae Warn when DISABLE_BACKUP is enabled
F/2257
2026-04-08 19:53:50 +02:00
David Garske a56c70e90a Support for NXP T1040 RDB 2026-03-20 14:51:15 +01:00
Mattia Moffa 175d2b3026 Update documentation 2026-03-18 22:38:17 +01:00
Mattia Moffa b5fab30310 Enable NSC veneers when TZEN=1, even without WOLFCRYPT_TZ 2026-03-18 22:26:32 +01:00
Thomas Cook 3b1ef9d6bc Address copilot pr comments. 2026-03-18 11:53:26 +01:00
Thomas Cook 0926705487 Add lpc55s69 to targets.md 2026-03-18 11:53:26 +01:00
Thomas Cook 2af2e795cb Initial support for lpc55s69 2026-03-18 11:53:26 +01:00
Mattia Moffa af94d676b6 Address more copilot remarks 2026-03-18 09:15:00 +01:00
Mattia Moffa 0656ff4afa Nordic nrf54l port (with and without TrustZone) 2026-03-18 09:15:00 +01:00
David Garske d62e8ae430 Improve measured boot support 2026-03-17 22:19:32 +01:00
Daniele Lacamera f7967fc535 wolfBoot_unseal_auth(): secretSz is now in/out param
The caller is now required to pass the available space in buffer.
The actual size of the unsealed secret is returned.

F/442
2026-03-12 09:28:51 +01:00
Pushyanth Kamatham 1c756b3583 Add external flash support and dual-bank flash swap functionality for PSoC6 devices.
Removed NVM_FLASH_WRITEONCE restriction for psoc6.
Update flash hal functions to support read-modify-erase-write way to perform the programming of flash.
2026-03-12 09:17:04 +01:00
David Garske 8da5d0f5e9 Documentation improvements. Peer review fixes 2026-03-09 07:29:27 +01:00
David Garske d23943a5af PolarFire SoC M-Mode, QSPI and L2-LIM support
Adds support for running wolfBoot in **Machine Mode (M-mode)** on the PolarFire SoC MPFS250T, booting from eNVM and loading a signed application from **SC QSPI flash** into on-chip LIM (Loosely Integrated Memory). No HSS (Hart Software Services) or DDR is required. It also extends the existing PolarFire HAL with multi-hart support, L2 cache configuration, per-hart UART, and refactors shared code (SDHCI, SCB mailbox, linker/test-app) for both S-mode and M-mode builds.
2026-03-09 07:29:27 +01:00
Brett Nicholas 6f9cf6a606 fix typo in readme 2026-03-06 17:05:45 +01:00
Brett Nicholas 3ada71953b code review fixes 2026-03-06 17:05:45 +01:00
Brett Nicholas bd4bc1970a Document WOLFBOOT_SKIP_BOOT_VERIFY 2026-03-06 17:05:45 +01:00
Brett Nicholas 4b751521e0 add example to monolithic doc section 2026-03-06 17:05:45 +01:00
Brett Nicholas 999a45008d add monoloithic self-update test case and docs 2026-03-06 17:05:45 +01:00
David Garske 4a53bd1627 Added support for running test-app and benchmarks. Added example trace32 scripts. 2026-03-05 17:49:37 +01:00
David Garske a5356b830a NXP T2080 Port Refresh
* Initial port refresh for the NXP T2080 target
* IFC Flash driver and multi-core support on T2080
* Working wolfBoot test-app startup on T2080
* Support for NAII and Curtiss-Wright T2080 vendor boards
2026-03-05 17:49:37 +01:00
Kareem c737d80867 Fix typos 2026-03-05 10:16:09 +01:00
Kareem 8a0d208c2f Clarify that wolfBoot_open_image_address expects the passed in img structure to be memset and does not perform the memset itself. 2026-03-05 10:16:09 +01:00
Brett Nicholas 3d5499f90a address review feedback 2026-03-05 10:14:04 +01:00
Brett Nicholas 2924646695 Add generic hook framework with provision for pre-init, post-init, and
boot hooks
2026-03-05 10:14:04 +01:00
David Garske 88a32de298 Move .bif and add CI test 2026-03-05 10:12:02 +01:00
David Garske ff8bb8336c Support for wolfBoot ZynqMP (UltraScale+ MPSoC) SD Card 2026-03-05 10:12:02 +01:00
David Garske 47256c8d6f Reduce build size for wolfCrypt and fix Vorago documentation 2026-03-05 09:24:52 +01:00