Commit Graph

300 Commits (0fd34f23c744a5944e22f816f04158c1d851d4be)

Author SHA1 Message Date
Marco Oliverio 48bc97dab7 efi: buildroot version bump to 2022.08.03 2023-07-17 14:26:23 +00:00
David Garske 25bca043ed Increase size limits by 38 bytes (due to v5.6.3 update). 2023-07-05 18:34:42 +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
Dimitri Papadopoulos be037ca04d Fix typos found by codespell 2023-07-04 07:43:02 +02:00
Hideki Miyazaki 5ed7390c40 reorganize folders under IDE/Renesas 2023-06-10 08:53:32 +02:00
Takashi Kojo 737c549161 Add tools/format-conv/der2raw 2023-06-10 08:53:32 +02:00
John Bland c6629ed86a add missing steps for policy pubkey sealing
update wolfTPM version to include new sealing functions, add preseal helper commands
2023-05-18 12:33:49 +02:00
John Bland 6a21c02e6c add a simulator test for using encryption and delta updates
increase argument count max since the tools duplicate the sig and hash args
2023-05-17 19:39:00 +02:00
Hideki Miyazaki 170bb9a585 Support Renesas RA6M4 with SCE use 2023-05-17 14:15:18 +02:00
Daniele Lacamera 048af83858 New partition sizes in tests 2023-05-15 13:38:57 +02:00
Daniele Lacamera bc5831747c Added extra clean round at the end of the powerfail test 2023-05-15 11:42:22 +02:00
Daniele Lacamera 588b3192d2 New simulator tests
- internal flash now mapped at 0xC0000000 (using `ARCH_FLASH_OFFSET`)
- wolfBoot binary included in internal flash (wolfboot partition is also
  now writeable to test self-updates and encryption)
- sim test app supports encryption (sets the key for test)
- added new target to store the update in the external flash
- external flash mapped to 0xD0000000
2023-05-15 11:13:38 +02:00
David Garske bd8d45e40f
Merge pull request #304 from jpbland1/preseal-compiled
add ability to compile preseal with no filesystem
2023-05-08 15:07:40 -07:00
John Bland f4cca4a367 add ability to compile preseal with no filesystem
fix a key not being unloaded, normaly doesn't crop up since in normal circumstances wolfBoot and the TPM both turn on fresh but on the simulator not freeing the key caseus a leak
2023-05-08 12:45:42 -04: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
John Bland cbf3cffa96 add script for preseal a public key to tpm
add more detailed instructions on how to prepare a TPM keystore build and how to use the preseal script
2023-05-04 20:49:02 -04:00
David Garske ef35f473c9
Merge pull request #296 from jpbland1/tpm-root-trust
wolfTPM pubkey storage with policy based access restriction
2023-05-04 15:09:06 -07:00
John Bland b94249f8f7 correctly identify a forward powerfail vs a revert
powerfail and add an exception to wolfBoot_delta_update when a revert gets
interrupted since the version will change in the middle of the update process
2023-04-22 06:13:53 +02:00
John Bland 14ec346e1c before calling wolfBoot_delta_update, check if the
0th sector has been changed with the update partition still being in
IMG_STATE_UPDATING state. the state still being IMG_STATE_UPDATING means that a
delta update started and that the version may have been switched over, in which
case wolfBoot_current_firmware_version() >= wolfBoot_update_firmware_version()
no longer tells us if we need to perform an inverse operation on it's own.

also removes part of the update powerfail test that does checks for the
previous version without triggering a rollback
2023-04-21 20:31:58 +02:00
David Garske 3b90e32356 Switch to small page size by default. Capture read_id return code. Add SPMATHALL to config.mk. 2023-04-21 16:41:00 +02: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
Daniele Lacamera 27df34264c Removed duplicate test entry in test.mk 2023-04-13 21:01:21 +02:00
John Bland 1e93b3d042 add policy signed header to sign.c 2023-04-12 13:36:03 -04:00
Daniele Lacamera d99f14045a Add 16KB random data at the end of the image 2023-03-21 18:03:38 +01:00
Daniele Lacamera 9759773f9d Added simulator tests with delta updates 2023-03-21 18:03:38 +01:00
Daniele Lacamera 57a8fb30f1 Added test scripts 2023-03-21 18:03:38 +01:00
David Garske 6f12975bc5
Merge pull request #289 from danielinux/gh-action-rsa4096
Parallelize renode tests execution, remove unfeasible test, add compile-time check for large stack usage
2023-03-21 10:01:17 -07:00
Daniele Lacamera 43fa7b17f1 Added WOLFBOOT_HUGE_STACK option
The option can be enabled to use RSA4096 with fast math.
2023-03-21 17:06:22 +01:00
Daniele Lacamera 8e74db2f27 Eliminate sigset warning in test-expect-version 2023-03-21 16:44:52 +01:00
Daniele Lacamera ab6cd52e7c keygen.c: fixed size of exported binary keystore 2023-03-20 09:10:53 +01:00
Daniele Lacamera cd7e4e10fc Fixed after reviewer's comments 2023-03-14 16:12:40 +01:00
Daniele Lacamera c36819ad0b Run 4 unit tests made out of unit-extflash.c
- clear text test of ext_flash_check r/w/erase
- Aes128
- Aes256
- ChaCha
2023-03-14 08:57:15 +01:00
Daniele Lacamera 0b06efd347 Added unit test for encrypted external flash 2023-03-14 08:57:14 +01:00
David Garske fa483a460a Fix docker tests in github actions by running the test as root in docker 2023-03-06 16:25:06 +01:00
David Garske 8dd0ee347f Support for the STM32 OCTOSPI peripheral. 2023-02-02 12:11:23 -08:00
John Bland 92bd8b6757 update flashing documentation and update scripts for the stm32u5 2023-01-31 09:26:20 -08:00
John Bland 20621a68ce
Fix issues with keygen tool (#269)
* Fix issues with keygen tool import `-i` feature.
* Fix issue with key import incorrectly assuming key size.
* Add support for importing an ECC key with header.
* Fix for missing ECC key free.
* Refactor keygen tool to use utility function to get key size
* Fix to handle encoded ECC public keys when using `--sha-only` or manual sign
2023-01-09 15:59:00 -08:00
David Garske a9526bab8f STM32 QSPI Flash support. Refactor SPI to allow different GPIO base/AF for each pin. Adds `DEBUG_UART` support for H7. 2022-12-20 13:31:28 +01:00
David Garske f283929161 Improvements to gap fill. The default gap filling byte is `0xFF`. If using `FLAGS_INVERT=1` uses `0x00`. Can be overridden at build-time using `FILL_BYTE`. Fixes ZD 15356. 2022-12-19 11:38:00 +01:00
David Garske da6d364f1e Fixes for encrypt/decrypt with unaligned address. Fix issue with byte count result on Mac. Cleanups for uart-flash-server. 2022-12-16 17:50:02 +01:00
Daniele Lacamera 4ee867b2dd Fixes for stm32wb test
- added img->hdr_ok flag when opening external flash image
- correct return value for uart_flash ext_flash functions
- correct image size in prepare_encrypte_update.sh
2022-12-16 17:49:46 +01:00
David Garske b1d7c43043 Fix for external SPI broken with cd6597e2a0 2022-12-14 23:07:38 +01:00
Daniele Lacamera 186027b122 Github workflows: new test scripts
Moved most of the commands inside the renode container.

Updated docker image to compile and run all tools, wolfboot and test
image within the renode container.
2022-12-13 16:45:57 +01:00
Lealem Amedie 18bfcecd6b wolfBoot cmake support 2022-12-07 13:00:10 -08:00
David Garske 6d45564112 Test size increases. Improve user_settings.h ECC options. 2022-12-06 06:20:48 +01:00
David Garske 2fc899254f Cleanups for NXP T2080 DEOS support:
* Expanded the NXP QorIQ T2080 documentation in `docs/Targets.md`.
* T2080 fixes for boot code placement and generation of .bin.
* T2080 UART driver cleanup.
* Improve bin-assemble fill speed and report items added.
* Make portability fixes to enable building in `mingw32-make`.
* Cleanup the `docs/Targets.md` sections and links.
* Cleanup execute bits on code files.
2022-12-06 06:20:48 +01:00
Daniele Lacamera 02d3dd67f0 Increase timeout value in incremental tests 2022-11-07 16:04:30 +01:00
Daniele Lacamera 5114e308ae Updated wolfSSL and wolfTPM submodules 2022-10-14 12:48:47 +02:00