Commit Graph

60 Commits (master)

Author SHA1 Message Date
Brett Nicholas 7660bf66f8 Add wolfHSM cert chain verification for ECC and RSA 2025-05-27 15:42:59 -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
David Garske 6f3722d31a Fix test-lib expected failure case. 2025-04-29 11:50:29 +02:00
Daniele Lacamera dedfce9440 Test application distributed off-tree 2025-01-24 13:06:38 +01:00
Daniele Lacamera 359c59fa47 Added IDE/pico-sdk dir to build wolfboot+blink app 2025-01-24 13:06:36 +01:00
Brett Nicholas ceffc788dd - support for wolfHSM ML-DSA on simulator and AURIX (DMA only)
- consolidate AURIX scripts into wbaurixtool.sh
- documentation updates
2024-12-16 19:12:23 +01:00
Brett Nicholas 78e4275f99 Initial wolfHSM support for simulator and AURIX TC3xx 2024-11-13 09:52:49 +01:00
David Garske cf936dffa2 Fixes for Xilinx zynqmp. 2024-08-14 18:06:12 +02:00
Brett Nicholas 2d6308ec2c - Infineon TC3xx support
- fix (existing) unused variable compiler warnings
- documentation updates
- add multi-sector erase option
2024-07-31 09:22:31 +02:00
David Garske 3444c47fdb * Added support for RX65N and RX72N with native Makefile and RX ELF GCC compiler.
* Added initialization of the clocks and UART driver.
   - wolfBoot uses on chip high speed oscillator (HOCO) at (120MHz RX65N and 240Mhz for RX72N).
* Added RX RSPI and QSPI driver support with external SPI flash
* Improve documentation and fix spelling errors.
* Added .srec (s-record) format support
* Added RX TSIP support for ECDSA (requires https://github.com/wolfSSL/wolfssl/pull/7685).
* Allow custom implementation of `get_trailer_at`, `set_trailer_at` and `set_partition_magic` using `CUSTOM_PARTITION_TRAILER`
2024-07-17 06:08:31 +02:00
Daniele Lacamera 213315507c Add command line tool to generate otp.bin 2024-07-09 08:42:33 +02:00
Daniele Lacamera 572e1157bc Added "otp-keystore-primer" tool 2024-05-15 10:55:46 +02:00
David Garske 0ddde6f074
Merge pull request #444 from miyazakh/renesas_rz_rsip
Add  RSIP use to Renesas RZ support
2024-05-10 11:52:12 -07:00
Hideki Miyazaki 21ce30f8e5 address review comments 2024-05-09 08:11:56 +09:00
Marco Oliverio ccf093dd0e .gitignore: x86_fsp: add TPM key and intermediate files 2024-04-29 09:53:49 +02:00
Hideki Miyazaki 3683ad0a33 add items to .gitignore
fix spelling errors
2024-02-27 15:51:02 +09:00
Daniele Lacamera c70c8a470d Added support for Microchip SAM E51 2024-02-15 17:30:11 +01:00
David Garske 83283c6cf7 Fixes for NXP T1024 and booting Integrity OS:
* Fixed PPC spin table based on ePAPR 1.1.
* Added flattened device tree (FDT) support. Setting required FDT fields per ePAPR 1.1.
* Added Frame Manager microcode upload.
* Fixed CPLD and setting QE clock.
* Added support for setting logical device numbers and updated device tree.
* Fixed QUICC Engine base address (was incorrect, should be 0x140000).
* Fixed "cpu-release-addr" to use 64-bit value.
* Added secondary cached boot page.
* Added L2 cache support to multi-core.
* Added flattened device tree parser tool for testing (`make fdt-parser` and `tools/fdt-parser/fdt-parser`).
* Added checks for FDT header.
* Added automated test case for NXP T1024 FDT.
2024-01-17 14:16:15 +01:00
Daniele Lacamera da43c99993 Added more unit tests. Added 'make cov'.
Fixed checks for invalid partition id
2023-10-13 14:30:45 +02:00
David Garske 56be972c9e Spelling and add TODO's for testing new keytool features. 2023-09-28 10:06:07 -07:00
Marco Oliverio ee802dbb34 git: ignore clangd .cache files 2023-09-28 13:12:26 +02:00
David Garske 490286be7d Support for sealing/unseal a secret based on an externally signed PCR policy.
* Added new `WOLFBOOT_TPM_SEAL` and `WOLFBOOT_TPM_SEAL_NV_BASE` config options.
* Added new `tools/tpm/policy_create` tool for assisting with creation of a policy digest. The sign keytool `--policy=file` signs the policy.
* Added new `WOLFBOOT_TPM_VERIFY` option to enable offloading of the asymmetric verification to the TPM. By default wolfCrypt will be used.
* Added example seal/unseal to update_flash for ARCH_SIM.
* Renamed `WOLFBOOT_TPM_KEYSTORE_NV_INDEX` to `WOLFBOOT_TPM_KEYSTORE_NV_BASE` to support multiple public keys.
* Refactored most TPM code into tpm.c.
* Refactored the keystore ROT to use new `wolfBoot_check_rot` API.
* Refactored the sign keytool to have a sign_digest function to allow signing firmware and policy for sealing/unsealing.
* Fix for make distclean && make using the wrong key tools.
2023-09-12 12:26:48 +02:00
David Garske 9ca58248e4 Adding GitHub Action for testing TPM features. 2023-08-17 13:43:58 +02:00
David Garske 7190392245 Simulator fixes and support for using MacOS:
* Added simulator support for Mac.
* Fix for simulator to properly assemble wolfboot.bin + signedtestapp + update + swap.
* Fixes for handling 64-bit assigned mmap virtual addresses. Added hal_flash_write and hal_flash_erase support for 64-bit address using uintptr_t. Enabled if platform is 64-bit and `FORCE_32BIT` is not defined
* Fix simulator conflict with src/libwolfboot.o object in test-app.
* Cleanup test-app linker flags.
2023-08-07 20:54:18 +02:00
David Garske 0f4675f6b7 Fixes and improvements for NXP QorIQ:
* Fix and refactor the L2SRAM support and use it for stage 1 loader stack.
* Fix NXP eSPI driver to support all sizes and properly handle keeping CS active.
2023-08-04 16:31:09 +02:00
David Garske db15f9b0f1 Further NXP P1021 fixes and improvements:
* Added ELF32 and ELF64 loader support (config `ELF=1` or build option `WOLFBOOT_ELF`).
* Add ELF support to `update_ram.c` loader.
* Add support for loading entire flash image to RAM when `EXT_FLASH=1` and `NO_XIP=1` (or `WOLFBOOT_USE_RAMBOOT`).
* Added QUICC Engine support to load microcode and enable.
* Add multiple core support for NXP P1021.
* Fixes to resolve first stage boot ROM relocation.
  - Implemented temporary workaround to resolve stack traps.
* Added PPC GOT relocation support.
* Fix for the PPC `isr_empty` handler address.
* Fix to allow stack to use DDR by having assembly setup DDR TLB. After relocating wolfBoot use stack on DDR.
* Cleanup wolfBoot output.
  - Only remove extra .bin/.elf created unless `make distclean` is used.
  - Don't output the key grep test (only check result).
  - Adjust build order (first stage, wolfboot, test app, key, sign test app and factory).
  - Fix to make sure linker script is rebuilt before objects.

Sample NXP P1021 Output:

```
Relocating BOOT ROM to DDR
Loading wolfBoot to DDR
Jumping to full wolfBoot
wolfBoot HAL Init
Flash Init: Ret 0, ID 0x76207620
QE: Length 63732, Count 1
QE: uploading 'Microcode for P1021 r1.0' version 0.0.1
QE: Traps 0
MP: Starting core 2 (spin table 0xFFFFF240)
Versions: Boot 1, Update 0
Trying Boot partition at 0x200000
Loading header 512 bytes to 0x1DFFFE00
Loading image 3170724 bytes to 0x1E000000
Image size 3170724
Firmware Valid
Loading elf at 0x1E000000
Found valid elf32 (big endian)
Booting at 0x6000
```
2023-07-05 17:03:57 +02:00
David Garske a56e2252c1 Revert the TPM based key store (root of trust). This feature is not ready for next release. 2023-07-04 08:36:41 +02:00
David Garske 0b7603f7bf
Merge pull request #303 from jpbland1/preseal
add script for preseal a public key to tpm
2023-05-05 15:02:55 -07:00
John Bland fa071065f6 update preseal based on pr comments 2023-05-04 22:58:20 -04:00
David Garske 69ca95eb94 Adds `factory_wstage1.bin` option to include first stage loader. Fix test-app verbose issue. 2023-04-21 16:41:00 +02:00
Lealem Amedie 18bfcecd6b wolfBoot cmake support 2022-12-07 13:00:10 -08:00
Daniele Lacamera 1542a15c90 Keystore: array of public keys generated by keygen 2022-07-19 15:32:28 +02:00
Marco Oliverio c077207b01 feature: simulated target
This commit introduces a simulated target where the internal and optionally the
external flash can be simulated and backed by files. Using this target will
produce an executable wolfBoot ELF image.
2022-07-12 10:13:10 +02:00
Daniele Lacamera d06178c3a8 Added new signature algo: ECC384 2022-04-01 12:21:42 -07:00
David Garske e3aaeccdb2 Minor fixes to get the IAR example building. 2022-02-14 10:47:02 -08:00
Daniele Lacamera 2e7b63eae5 Adding support for ED448 verification 2021-12-13 12:05:37 +01:00
Marco Oliverio a187442455 support booting EFI application on x86_64 architecture
Co-authored-by: Daniele Lacamera <daniele@wolfssl.com>
2021-11-30 18:43:50 +01:00
Daniele Lacamera 012bba3ce3 Fixed after review comments 2021-08-20 10:10:51 +02:00
David Garske d38de3b432 Update copyright year 2021-07-19 07:50:02 -07:00
Elms c1e000faa0 make: clean up and check_config update
Also add emacs backup files to ignore
2021-06-08 18:14:41 +02:00
David Garske 7f2061a9cb Add support for using the Xilinx BSP QSPI driver. Update to latest wolfSSL (fixes chacha build error in Visual Studio). 2021-02-03 10:17:58 +01:00
Daniele Lacamera 944f816f05 Improved boundary checks in wolfBoot_find_header 2020-08-13 13:56:47 +02:00
David Garske c473a53ebe Improvements to the key tools documentation. 2020-06-24 09:04:24 -07:00
David Garske 0c5b66c39e Fixes for TPM with RSA.
* Requires PR https://github.com/wolfSSL/wolfTPM/pull/101
* Cleanup of software vs. TPM code `wolfBoot_verify_signature` functions (ECC and RSA)
* Adjusted the stack size checks with TPM.
* Added STM32F4 programming/debugging instructions.
* In V=1 mode show the keygen command.
2020-06-23 11:57:09 -07:00
David Garske 3f1a18f8a9 Fixed unused warning fixes and missing errno.h in keygen.c. Update tools/keytools Makefile to build keygen. Cleanup to support using C version of "sign" and "keygen" after "make keytools". 2020-04-07 18:27:05 +02:00
Daniele Lacamera 8c6272df4a Completed Windows/IAR example, removed extra files 2020-03-31 11:54:58 +02:00
David Garske 2f3da0220c Visual Studio project for standalone C signing tool. 2020-03-11 11:47:53 -07:00
David Garske c0b534edd7 wolfBoot Aarch64 support (Xilinx Zynq and Raspberry Pi):
* Added Aarch64 boot/startup support
* Added configuration templates for Raspberry Pi 3 and Xilinx ZynqMP UltraScale+
* Added Xilinx Zynq QSPI bare-metal Driver
* Added `NO_XIP` option for full `ext_flash_*` API on all partitions
* Added Xilinx SDK Project Template
* Added support for DTS image partitions
* Added wolfBoot signing tool in Native C (`tools/keytools/sign.c`).
* Added libwolfboot functions `int wolfBoot_fallback_is_possible(void);` and `int wolfBoot_dualboot_candidate(void);`
* Performance improvement to only hash application firmware image once
2020-03-04 12:04:46 -08:00
Daniele Lacamera c847529698 Added RSA-4096 bit support 2020-01-07 11:32:09 +01:00
David Garske fae6a974c8 Adds RSA support to wolfBoot using "SIGN=RSA2048". Includes RSA signing script tool in Python and instructions. 2019-12-17 09:44:02 -08:00