Commit Graph

136 Commits (0fd34f23c744a5944e22f816f04158c1d851d4be)

Author SHA1 Message Date
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
Dimitri Papadopoulos be037ca04d Fix typos found by codespell 2023-07-04 07:43:02 +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 6f24981f03 Improvements to the clock calculation code (dynamic based on ratio). Remove execute bits on files. Make stage1 PIC. Disable L1/L2 for first stage. Add PLT/GOT to .data region. 2023-05-10 15:11:09 -07:00
David Garske 89b2303b87 Fix NXP T2080 build. 2023-05-09 09:49:51 -07:00
David Garske c2fbcecda1 Reduce first stage init code (don't relocate CCSRBAR or invalidate all TLB's). Improve udelay to use timebase. Fix L1 cache line sizes. Fix L2ADDR to enable all 256KB. Use `do_boot` not the jump to function pointer. Switch PPC test app linker script to use `WOLFBOOT_LOAD_ADDRESS`. 2023-05-08 17:42:14 -07:00
David Garske 790a63809f Update P1021 test-app to use shared HAL for UART. 2023-05-05 12:49:06 -07: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 fe2b797b01 get wolfboot simulator working with the tpm simulator
move pcr reset and extend outside of session

the tpm uses policy checking for modifying PCR's so we need to reset and extend the PCR's with the image hash before the session begins, currently tested unseal, having trouble getting the simulator to run update in order to test reseal
2023-05-03 11:39:25 -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
Daniele Lacamera 57a8fb30f1 Added test scripts 2023-03-21 18:03:38 +01:00
Daniele Lacamera 6aa5c114e5 Added option to sim target to simulate powerfails 2023-03-21 18:03:38 +01:00
Brett Nicholas 680ce5f8e8 first commit - test app boots on MIMXRT1064-EVK 2023-03-06 17:31:48 +01:00
David Garske 80ac15693c Fixed STM32H7 UART 5. Added CMake support for DEBUG_UART. Adjust example config to use correct QSPI offsets for update partition. 2023-03-06 16:25:06 +01:00
David Garske e375363bbb Add CMake `QSPI_FLASH` and `OCTOSPI_FLASH` options. 2023-02-02 12:11:23 -08:00
David Garske 8dd0ee347f Support for the STM32 OCTOSPI peripheral. 2023-02-02 12:11:23 -08:00
Daniele Lacamera d4cd79e678 Fixed cosmetics after code reviews 2023-01-27 08:35:08 +01:00
Daniele Lacamera b48b35a498 Fixed selection of the cached sector before write 2023-01-26 18:31:36 +01:00
Daniele Lacamera 3d517cfe8c NVM_FLASH_WRITEONCE refactoring
- Using two sectors to keep partition/sector flags
- Keep two redundant set of flags, update one at a time
- Erase is done when the sector is old
- Flags update is faster because Erase is done in advance
- Accessing trailer information (including encryption keys) is done by
  selecting the newest information

Tested via renode, using nrf52 with NVM_FLASH_WRITEONCE flag on.
2023-01-26 09:22:48 +01:00
David Garske 47e9d7a591
Merge pull request #261 from cmcquinn/cmake-fixes
Improvements and fixes for CMake
2023-01-13 15:28:55 -08:00
David Garske c6983b8c42 Progress on P1021 support (work in progress). 2022-12-29 18:27:40 +01:00
David Garske 022b8d3c13 Progress on adding NXP QorIQ P1021 support. 2022-12-29 18:27:40 +01:00
David Garske e88a7dcae3 Progress on DDR support for QorIQ. Refactor the platform to use "nxp_". 2022-12-29 18:27:40 +01:00
David Garske 005df0949d Disabled builds that have requirements not supported yet. Fixed L0 build. 2022-12-28 19:15:50 +01: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
Cameron McQuinn 8ace007cd8 Improvements and fixes for CMake 2022-12-15 00:56:57 -07:00
Lealem Amedie 18bfcecd6b wolfBoot cmake support 2022-12-07 13:00:10 -08:00
David Garske 2a481af879 Fix bug with update_ram.c when using fixed partitions. Support for MMU setup on e6500. Progress on DDR support. 2022-12-06 06:20:48 +01:00
David Garske bfed41889b Improvements to the NXP T2080 support. Adds NOR Flash and IFC configuration. Adds CPLD support. Make `DEBUG_UART` a configure option. 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
David Garske c346fab41b Support for NAII 68PPC2 with NXP T2080 on DEOS 2022-09-23 15:44:49 +02:00
Daniele Lacamera a6fdec3901 self-encrypt prototype; tested on stm32l0 2022-09-21 18:49:52 +02:00
Daniele Lacamera ec88e96037 Fixed regression compiling test-app 2022-07-21 21:05:13 +02:00
Daniele Lacamera 16dc1628af Fixed target 'simulator' 2022-07-21 20:23:13 +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 51de556e1b Added support for NXP i.MX-RT105x 2022-04-21 18:53:24 +02:00
elms 7dda1fe267
Merge pull request #176 from danielinux/renode-test 2022-02-15 07:48:43 -08:00
David Garske b46c5b222c Cleanup STM32H7 target documentation and code. 2022-02-14 10:51:53 -08:00
Daniele Lacamera 826305c2f1 Fixed warning in nrf52 app 2022-02-11 10:48:47 +01:00
Daniele Lacamera f2280f5575 Added renode board: nrf52840 2022-02-11 10:48:47 +01:00
Daniele Lacamera 539cc97e73 Added renode board: sifive-hifive-fe310.
+Quicker test
2022-02-11 10:48:47 +01:00
Daniele Lacamera 402d7b412c Added new renode board: stm32F746 2022-02-11 10:48:47 +01:00
Daniele Lacamera 43a5a38629 Fixes to AES-CTR encryption after testing 2022-01-31 16:46:09 +01:00
David Garske 5463105eab Adds STM32U5 support. Thank you ST. 2022-01-24 00:07:03 -08:00
Daniele Lacamera 33102a54fd Fixed STM32L5 dual-bank mode 2021-11-17 11:53:57 +01:00
David Garske ff28cec38a Minor cleanups. Add the required Cube HAL to app Makefile. 2021-08-26 13:03:49 -07:00
Hajer KALLEL 17a3d5c476 Added led support for STM32L4R5 2021-08-26 13:03:49 -07:00
Hajer KALLEL 94cacfe795 Added test-app for STM32L4 2021-08-26 13:03:49 -07:00
Daniele Lacamera 012bba3ce3 Fixed after review comments 2021-08-20 10:10:51 +02:00