Commit Graph

385 Commits (fe3967ea4417ff90d2207a3a1ed01588e396a66c)

Author SHA1 Message Date
David Garske 4d0106caee Fixes for build warnings 2025-10-30 16:31:27 +01:00
Juliusz Sosinowicz 2345138a1b Implement filesystem-based partition state access and CLI tools
- Add filesystem access implementation in HAL (`hal/filesystem.c`)
- Introduce new library_fs target and build rules for filesystem-backed partition management
- Provide example configuration for library_fs
- Add CLI application (`hal/library_fs.c`) to query and manage partitions
- Update documentation with usage instructions and build steps for the new CLI tool
- Update .gitignore
2025-10-30 16:31:27 +01:00
Mattia Moffa 177358e88d Update H5 app to use new NSC API
- Make the update and swap partitions secure and inaccessible from the
  app except via NSC API
- Add a couple of necessary new NSC functions
- Update the app to only use NSC API
- Fix hal_flash_erase to account for secure addresses
- Fix some bugs in xmodem implementation
2025-10-29 00:13:01 +01:00
Daniele Lacamera 18cbea59de Refactoring of IV handling to prevent reusing IVs
During fallback operations, use a different encryption IV than the one
used to encrypt the backup during the update. This ensures that the same
IV is never reused to encrypt different sectors.
2025-10-17 09:44:46 +02:00
David Garske 68d28fc482
Merge pull request #609 from gojimmypi/pr-copyright
Update Copyright year to 2025
2025-10-16 15:09:03 -07:00
David Garske 301080adc4 Reverted change for H5 heap (not needed). Tracked issue down to a missing malloc fixed here: https://github.com/wolfSSL/wolfssl/pull/9305 2025-10-16 23:02:09 +02:00
David Garske 2df3768cce Fixes to support latest wolfSSL (disable KDF/PRF) 2025-10-16 23:02:09 +02:00
gojimmypi fbd8dcf8a2
Update Copyright year to 2025 2025-10-15 11:33:53 -07:00
David Garske 7f193af97d Fixes for STM32H5 TrustZone and PKCS11 store 2025-10-10 19:42:20 +02:00
David Garske 8ef41994c7
Merge pull request #604 from bigbrett/tc3xx-wolf-startup-integration
TC3xx: Replace IDE/AURIX project with new HAL module
2025-10-09 10:16:16 -07:00
Brett Nicholas 42cf7e9b70 TC3xx: Replace IDE/AURIX project with new HAL module 2025-10-08 11:03:44 -06:00
David Garske 0ce77a4d27
Merge pull request #590 from danielinux/flash-write-as-nsc
NSC functions: add helper to facilitate updates as trustzone non-secure callable
2025-10-07 09:21:02 -07:00
Daniele Lacamera 568452552c Fix corruption of last boot sector with encryption
As reported by @reza-hdd in #589:

> When Firmware is large enough to consume all the allocated boot partition sectors, in the the final swap and erase operations (_wolfBoot_swap_and_final_erase_) the last sector of FW in Boot partition, which is used as a temporary sector for a copy operation, gets corrupted after being copied in external Swap partition and copied back. It looks like the contents are copied to the external Swap partition without being encrypted, but get decrypted when it is read back.

This was due to the function wolfBoot_copy_sector() assuming that all
copies having an external SWAP as destination would not need any
encryption, as the "normal" case during update is to copy already
encrypted sectors from UPDATE->SWAP.

In the final state, after the update is successfully applied, the
mechanism saves a copy of the last sector from BOOT->SWAP. In this case,
if the application is big enough, an extra function is needed to
encrypt the content of this last sector before writing it to SWAP.

Restoring the backup is OK (normal case SWAP->BOOT, decryption was
already there as also noted by the reporter).
2025-09-10 13:27:22 +02:00
Daniele Lacamera cd347b5886 Fix visibility of new nsc declarations 2025-09-05 18:14:04 +02:00
Daniele Lacamera 82e4950b59 Added NSC functions to facilitate updates from NS application 2025-09-05 14:12:50 +02:00
Daniele Lacamera 68e688eeb6 Updated Changelog, version 2025-08-01 13:21:47 +02:00
Brett Nicholas 1febfd906e unify global HAL names between server/client, update docs 2025-06-25 12:17:39 +02:00
Brett Nicholas c106d92a48 wolfHSM server support with X509 auth 2025-06-25 12:17:39 +02:00
David Garske 1712edc136 Add support for PowerPC 32-bit SHA256 assembly speedups. Minor fix for ELF loading to set entry point before copying sections (resolves issue with loading on top of current location). Rename elf_load_image_mmu argument `entry` to `pentry` to avoid confusion with GET_H64 macro's use of header member "entry". 2025-06-24 19:02:49 +02:00
David Garske 79cef5f605 Peer review fixes (thank you Copilot). 2025-06-16 19:05:49 +02:00
David Garske b79be86a56 Fix for `NO_SWAP_EXT=1` with encryption enabled. Peer review fixes. 2025-06-16 19:05:49 +02:00
David Garske 3d9beb2642 Cleanup the AES CTR IV. 2025-06-16 19:05:49 +02:00
David Garske 73fc193931 Portability fixes with include < vs ". Added `NO_SWAP_EXT` to allow support for onboard flash swap sector. Added `WOLFSSL_NO_CT_OPS` for ECDSA verify only. Added `WC_NO_DEFAULT_DEVID` to help with code size reduction. 2025-06-16 19:05:49 +02:00
David Garske 844196981b Cleanup includes. 2025-06-16 19:05:49 +02:00
David Garske 8e6b0af105 Added Renesas RX TSIP encrypted updates support using AES CTR. Requires https://github.com/wolfSSL/wolfssl/pull/8854 2025-06-16 19:05:49 +02:00
David Garske 9451b47628 Fix for Renesas TSIP key types. Fix for Renesas RX .keystore location in linker script. Fix for wolfBoot as library with Renesas to make sure crypto hardware is initialized and setup. Add forced alignment on additional buffers used for flash read/write. 2025-06-16 19:05:49 +02:00
David Garske 487efc606d Improvements for portability using older gcc 4.8.2. Make sure wolfboot.h includes the `wolfBoot_verify_*` API's. Fixed issue with parsing headers when `#include` is `# include`. 2025-06-16 19:05:49 +02:00
Marco Oliverio 4154057649 hal: add missing include in hal.h 2025-06-09 16:29:31 +02:00
Brett Nicholas 7660bf66f8 Add wolfHSM cert chain verification for ECC and RSA 2025-05-27 15:42:59 -06:00
Brett Nicholas 16e5b94e9d review comments 2025-05-09 19:06:33 -06:00
Brett Nicholas d49e507926 - Support external flash for elf scatter-loading
- Support ELF scatter-loading on TC3xx
- Modify TC3xx HAL flash erase to support arbitrary offsets and sizes
- Realign partition size and addresses to support more efficient sector mass erase on update
2025-05-08 08:50:26 -06:00
Daniele Lacamera d587a793c0 Added WOLFSSL_PUBLIC_MP to user_settings when PKCS11 is enabled. 2025-04-30 13:45:08 +02:00
Daniele Lacamera c4a3415e98 Updated bootloader version number 2025-04-30 11:49:15 +02:00
David Garske b17ea82232 Fix to not include the fdt.h header unless MMU is defined. The fdt.h has a few structs with [0] size arrays that don't work with older GCC. 2025-04-29 11:50:29 +02:00
David Garske 271ae4c2f0 Improving matrix. 2025-04-29 11:50:29 +02:00
David Garske b6179a2780 Fixing test-lib matrix. 2025-04-29 11:50:29 +02:00
Daniele Lacamera ea0b4fb935 Added missing files + cosmetics as per review
- Added missing `test-app/app_sim_scattered.c`
- Added missing `test-app/sim_scattered.ld`
- Fixed comments at the end of define blocks for consistency
- Removed unused constants as indicated
2025-04-11 15:55:05 +02:00
Daniele Lacamera 386a172587 Fix regressions detected by github workflows 2025-04-07 17:10:37 +02:00
Daniele Lacamera d9104ec151 Fix scatter-gather ELF 2025-04-07 12:19:04 +02:00
Daniele Lacamera 11091944d7 ELF_SCATTERED: added sha check (WIP) 2025-04-04 19:15:04 +02:00
Daniele Lacamera e7cd340ebf Moved elf parsing/scattering to elf.c, WIP sim 2025-04-03 17:12:42 +02:00
Brett Nicholas fb6ca4378f WIP: structure is there, but some major issues. See WOLFBOOT-ELF-LOADER-GAPS.md and video 2025-04-03 09:53:00 +02:00
Daniele Lacamera 076cd1d6c4 Fix for unit test failing 2025-03-04 18:20:46 +01:00
Daniele Lacamera a195efe608 Avoid enforcing alignment on stack for IAR 2025-02-27 16:46:26 +01:00
David Garske 4c2d2b7e6e Add support for Armored mode with IAR. Currently only supports ECDSA and Cortex-M. ZD19190 2025-02-05 16:06:18 +01:00
jordan e2db8d58c4 Remove external ext_lms, ext_xmss pq integrations. 2025-01-20 16:38:24 +01:00
Daniele Lacamera 892acfded8 Prepare release 2.4.0 2025-01-07 13:35:28 +01:00
David Garske 7205820afa Added QSPI DMA support. 2024-12-30 15:36:43 +01:00
David Garske acb9d832eb Fixes for Xilinx Zynq UltraScale+ MPSoC:
* Fixes to support wolfBoot native make and gcc-arm cross compiler. ZD 18159
* Adjust wolfBoot linker script to not use 0 base, instead use end of DDR - 1MB.
* Fixed QSPI bare-metal driver for multi-sector and read return code.
* Fixed issue with Xilinx XMSS IMAGE_HEADER_SIZE in documentation. It should be 5000 bytes.
* Performance optimizations for QSPI:
  - Allow configuration of SPI clock.
  - Improve GSPI FIFO TX/RX fill.
* Added support for FAST_MEMCPY that supports an aligned 32-bit.
* Added Flattened uImage Tree (FIT) image (FDT format).
* Added Aarch64 support for FDT fixups.
* Added Aarch64 startup to support EL2 with cache/MMU.
* Added documentation about exception levels
* Moved zynqmp registers to header.
* Fix printf uart_writenum "buf" len.
* Updated fdt-parser to support saving off larger data images.
2024-12-30 15:36:43 +01:00
Marco Oliverio 1276e152b6 gpt: fix spelling error 2024-12-19 20:12:16 +01:00