Commit Graph

265 Commits (b5fab30310c85dd70e37c5d4ae0a619fbbc21039)

Author SHA1 Message Date
David Garske adce087884 Fix for iMX RT to use correct CortexM architecture. 2023-08-21 11:08:48 +02:00
David Garske 6ea1a1e4a5 Added GitHub action build tests for NXP parts (iMX RT, Kinetis and LPC). 2023-08-21 11:08:48 +02:00
David Garske 5c63d75890 Add support for iMX RT1050 and RT1060 wolfBoot_printf using DEBUG_UART=1. 2023-08-21 11:08:48 +02:00
David Garske db032d1461
Merge pull request #330 from danielinux/stage1_verify
x86 Stage1: add verification of components
2023-08-10 13:52:24 -07: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
Daniele Lacamera 95c7b92762 Moved FSP_M back to XIP 2023-08-07 15:47:40 +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
Daniele Lacamera 98b7f48ea2 Renamed "loader.map" -> "loader_stage1.map" 2023-08-04 11:42:24 +02:00
Daniele Lacamera 817568ba24 renamed: x86_fsp_tgl_loader.c to kontron_vx3060_s2_loader.c 2023-08-04 09:55:41 +02:00
Daniele Lacamera a81365437b STAGE1_AUTH feature ported to TGL (untested) 2023-08-01 11:44:58 +02:00
Daniele Lacamera 7712a38639 Load FSP_S and FSP_M to RAM before auth 2023-07-27 17:53:19 +02:00
Daniele Lacamera 02dfec6fac Added wolfBoot authentication in stage1 2023-07-27 14:49:23 +02:00
Daniele Lacamera 0a56a70872 FSP_T auth: removed. FSP_M/S auth: before use 2023-07-27 10:45:02 +02:00
Daniele Lacamera 06b6c0103e Feature: verification of FSP images' signatures 2023-07-27 09:39:53 +02:00
Daniele Lacamera 2144057da8 Added option for authentication in stage1 2023-07-26 17:54:35 +02:00
Marco Oliverio c4ec5eef35 x86: support Intel FSP (TigerLake and QEMU) 2023-07-24 18:12:32 +00:00
Daniele Lacamera efa28e3787 x86_64: support SP_MATH on x86_64 architecture
Signed-off-by: Marco Oliverio <marco@wolfssl.com>
2023-07-24 18:12:13 +00:00
David Garske 63766c24e3 Fixes for regression testing on NXP T2080. Fix legacy U-Boot image header load address (make optional feature). Cleanup disabled/dead code. 2023-07-05 17:03:57 +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
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 a5bb56599c Fix PIC for PowerPC. Must put `got2` into the flash region. 2023-05-10 16:52:24 -07: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 0f110e4cd9 Progress on eSPI support for NXP P1021 TPM. 2023-05-04 15:23:45 -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
David Garske 553ec760fd NXP QorIQ refactor for shared PPC (e500 / e6500) registers
* Fixes for e500 L1/L2 cache.
* Fixes for eLBC and DDR3 drivers on P1021.
* Fixes for LAW and TLB for P1021.
* Fix for the e500v2 core peripheral issues with data barrier / coherency safety.
* Support for SP math all (`SPMATHALL=1`).
* Support for stage 1 loader (`make stage1`).
2023-04-21 16:41:00 +02:00
David Garske cb1eaff8e8 Support for SP math with AARCH64 when hardware supports it. 2023-03-09 07:05:24 +01:00
Brett Nicholas 6dacae2945 removed imx_rt10xx_nor files from codebase and replaced with SDK reference 2023-03-06 17:31:48 +01:00
Brett Nicholas b6cf7f94a9 removed local path to SDK from compiler include path 2023-03-06 17:31:48 +01:00
Brett Nicholas 680ce5f8e8 first commit - test app boots on MIMXRT1064-EVK 2023-03-06 17:31:48 +01:00
David Garske 8dd0ee347f Support for the STM32 OCTOSPI peripheral. 2023-02-02 12:11:23 -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 bc89cb6594 Added minimalistic printf UART support (enabled with `DEBUG_UART`). 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 c3b5ac156b Experimental STM32U5 external flash support. 2022-11-23 18:13:03 +01:00
David Garske c346fab41b Support for NAII 68PPC2 with NXP T2080 on DEOS 2022-09-23 15:44:49 +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
David Garske 6068a8047c wolfBoot improvements (from elms):
* Add `WOLFBOOT_DUALBOOT` for dynamic fallback
* Refactor header field parsing
* Cleanup compiler warnings and logic extra check
* Option to leave out partition based functions
* Add `WOLFBOOT_FIXED_PARTITIONS` enable using partition enum and related functions
* Wrap all delta update references
* Update raspberry documentation
* EFI refactoring
* Add `keytools_check` target
* Add "library" target
2022-05-20 08:06:07 +02:00
Daniele Lacamera 51de556e1b Added support for NXP i.MX-RT105x 2022-04-21 18:53:24 +02:00
Daniele Lacamera e9c3b70f45 Added SP-math assembly optimizations for Cortex-M0 2022-04-07 11:20:24 +02:00
Elms 048eaffbe6 EFI: fixes and expand documenation
* Add EFI x86_64 include
* fix keytools build with EFI config
* Enable debug by default
* Expand `Targets.md` EFI section
2022-02-25 01:16:59 -08:00
David Garske 5463105eab Adds STM32U5 support. Thank you ST. 2022-01-24 00:07:03 -08:00
Daniele Lacamera 34341f96f7 Change FLASH origin for stm32f4 to 0x08000000 2022-01-21 00:07:19 +01:00
Daniele Lacamera 7b7ddb8b7b Fixes to build PSOC6 2022-01-10 09:19:22 +01: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
David Garske 2526dbb40a Fix to use flash base address on STM32G0. 2021-11-29 23:17:43 -08:00
Elms d302c633c2 TMS570LC43xx: flash updates and init stack pointer
- cleanup warnings and rework exceptions to be more robust
 - CORTEX R5: Initialization of stack pointer
 - updates to F021 flash from testing
 - sync options for command line build with IDE
2021-10-07 01:45:18 -07:00
David Garske ff28cec38a Minor cleanups. Add the required Cube HAL to app Makefile. 2021-08-26 13:03:49 -07:00
Hajer KALLEL b7d427e36e Removed whitespace 2021-08-26 13:03:49 -07:00
Hajer KALLEL dfddc06dec Added support for STM32L4xx 2021-08-26 13:03:49 -07:00
Daniele Lacamera 45570e6c21 Fixes for USE_FAST_MATH 2021-07-13 18:09:20 +02:00
Daniele Lacamera 4c4d7d69f8 Add support for WOLFBOOT_SMALL_STACK 2021-07-09 10:15:37 +02:00
Elms b4f68d0c6b TMS570LC43xx: fix default compiler programs and options 2021-06-23 09:12:17 +02:00
Elms fad70ef7f7 make: refactor `-Wstack-usage` and `XMALLOC_USER` and override for R5 2021-06-23 09:12:17 +02:00
Elms f8685b195c TMS570LC43xx: add project files for Hercules Code Composer Studio 2021-06-23 09:12:17 +02:00
Elms ee0f93fee0 TMS570LC43xx: Add flash from RAM and test-app and cleanup
* add flash demo from RAM
 * clean up linker script and flags
 * Add hercules test-app: link script and minimal c file

`make CCS_ROOT=/c/ti/ccs1031/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS F021_DIR=/c/ti/Hercules/F021\ Flash\ API/02.01.01`
2021-06-23 09:12:17 +02:00
David Garske 31b785fe7e Progress with cross-compiling wolfBoot. Will also be creating CCS project. 2021-06-23 09:12:17 +02:00
David Garske a7b61db9e1 Cleanup ARM boot code. TI R5 support. 2021-06-23 09:12:17 +02:00
David Garske 63e36692db Fix for AARCH64 and SP, not building sp_c32.c. Fix image header size for raspberry pi. Added logging.c to DEBUG=1. 2021-06-04 13:47:23 +02:00
Elms 08e9796822 make: Add PPC arch and refactor some of Makefile 2021-05-14 09:38:31 +02:00
David Garske c14e70a12c Changed RSA4096 to use SP math. Fix to disable dynamic stacks `WOLFSSL_SP_NO_DYN_STACK`. Added G0 details. Update submodules. 2021-03-26 16:38:08 +01:00
Daniele Lacamera 19cc89b128 Fixed indentation in arch.mk 2020-11-20 08:09:18 +01:00
Glenn Ergeerts 3682e66818 stm32l0: add support for external SPI flash 2020-11-19 13:30:14 +01:00
David Garske 4706d2f126 Peer review fixes. Fixes for SHA3 and RSA4096 in makefiles. Fixes for Xilinx SDK excludes. Cleanup of the printf to use the built-in facilities (`wolfBoot_printf`). 2020-11-12 10:47:32 +01:00
David Garske c5ec4e31d8
Merge pull request #81 from danielinux/imx-rt1060
i.MX-RT1060 support
2020-10-09 09:35:29 -07:00
Daniele Lacamera f533c7c654 Cleanup test application + removed unused components 2020-10-09 16:53:07 +02:00
Daniele Lacamera d6257fb62d RT1060: Added support for HW SHA acceleration via DCP 2020-10-09 13:44:06 +02:00
Daniele Lacamera 9186c263a2 Fixed IMX-RT-1060 flash driver, working update 2020-10-09 13:26:28 +02:00
Daniele Lacamera c26d2c0517 Fixed bootloader link step; added stub for nor flash driver 2020-10-07 18:41:02 +02:00
Daniele Lacamera cbe002fad7 Merge branch 'update-flags-in-boot-partition' into stm32l5 2020-09-28 17:10:28 +02:00
Daniele Lacamera 4e5517d0d9 Added makefile options + test application for i.mx-RT1060
(work in progress)
2020-09-28 14:45:15 +02:00
Daniele Lacamera 75898806eb Added option FLAGS_HOME to store UPDATE flags in the BOOT partition 2020-09-11 11:25:51 +02:00
Daniele Lacamera 5614c75f1e Fixed address alignment, TZEN=0 mode not yet working 2020-09-09 14:26:30 -07:00
Daniele Lacamera 12ea412029 Cosmetic fixes (whitespaces) 2020-09-09 14:26:30 -07:00
David Garske 43c2e3dd79 Experimental support for STM32L5 2020-09-09 14:26:30 -07:00
Daniele Lacamera 17707b7a37 Support for PSOC6 crypto support: added compile option 2020-06-05 11:49:57 +02:00
Daniele Lacamera 006320901e Added support for psoc6 HW crypto ECC verification 2020-06-05 11:40:08 +02:00
Daniele Lacamera 60d599542d PSoc6 uses HW crypto accelerator for sha256 2020-06-05 11:39:37 +02:00
Daniele Lacamera c1f01649a4 Fixed psoc6 configuration 2020-05-29 08:21:45 +02:00
Daniele Lacamera f3d0d8fc83 PSoC6 support: updated configuration, docs added to Targets.md, revert
custom NVM_CACHE_SIZE
2020-05-20 06:53:00 -07:00
Daniele Lacamera 5d932fe857 Removed custom assembly code for psoc6: using boot_arm startup (in C) 2020-05-20 06:53:00 -07:00
Daniele Lacamera c3e19daa5d PSOC6: fixed clock setting (added flash wait states), minor include
paths fixes, removed test code
2020-05-20 06:53:00 -07:00
Daniele Lacamera 6dcbc3572d Psoc6: fixes for correct device bring-up 2020-05-20 06:53:00 -07:00
Daniele Lacamera 3db37a6b5c Updated NVM_CACHE_SIZE to match different configurations.
Progress on psoc6 HAL, fixed memory mapping and test app
2020-05-20 06:53:00 -07:00
Daniele Lacamera 1e8a0fb6aa Fixed system settings component in use (cm0plus vs cm4) 2020-05-20 06:53:00 -07:00
Daniele Lacamera 49845bb72d Fixed compile flags for psoc6 2020-05-20 06:53:00 -07:00
Daniele Lacamera 75638394b1 Initial draft for psoc6 support 2020-05-20 06:53:00 -07:00
Daniele Lacamera 7ffcdca098 External, emulated non-volatile memory over UART 2020-04-03 14:27:42 +02:00
David Garske 1bdfb3200a Added `NO_QNX` option to force not using QNX driver (when using QNX compiler). 2020-03-10 13:19:09 -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 c32c5da6a1 Renamed KINETIS to MCUXPRESSO, added initial support for LPC family 2020-03-04 08:01:05 +01:00
Daniele Lacamera 302f69b529 Link sha256.o module even if sha3 is selected, as it's needed by RSA 2020-01-09 16:04:29 +01:00
Daniele Lacamera d33c5acac8 Added support for SHA3 2020-01-07 20:35:31 +01:00
Daniele Lacamera c847529698 Added RSA-4096 bit support 2020-01-07 11:32:09 +01:00
David Garske 5779baa8a9 Various items for STM32WB55 2019-12-20 19:08:31 +01:00
David Garske 79277d60ce Progress on expanding STM32WB testing support. Including external SPI/TPM and RSA. Fixes to prevent STM32WB macro collisions with PKA. Makefile improvements for combinations of PKA, SIGN and WOLFTPM. 2019-12-20 19:08:31 +01:00
Daniele Lacamera 25455744b6 Make Stm32 SPI driver more generic to reuse on other STM32 platforms 2019-12-20 19:08:31 +01:00
David Garske d146193615 Support for STM32H7. 2019-12-16 14:44:45 -08:00
Daniele Lacamera 0b822cefbb Fixes to kinetis K82F 2019-11-11 14:27:16 -08:00
Daniele Lacamera c78f0d7026 Added support for STM32 PKA 2019-11-11 15:06:04 +01:00
Daniele Lacamera 34def41dd1 Added support for STM32F7 + DUALBANK_SWAP hw-assisted support 2019-07-17 11:37:43 -07:00
Daniele Lacamera 254882c5f2 Added support for STM32G0 (tested on STM32G070-Nucleo) 2019-07-16 08:46:14 -07:00
Daniele Lacamera e016722e66 Added support for STM32L0X3
(firmware update successfully tested on STM32L073)
2019-07-15 08:55:15 -07:00
Daniele Lacamera 5c8bad047c Moved hifive1_write_page to separate module 2019-06-20 15:46:47 +02:00
David Garske 7a28c9efa4 Resolved peer review items. Thanks Daniele. Documentation improvements. Added open() check for update server example. 2019-06-10 21:21:32 +02:00
David Garske 1b68506fdc Added unused function pruning to RISCV build. Updated debugging commands. 2019-06-08 17:46:47 -07:00
David Garske 317bca179c Fix for `ARCH_FLASH_OFFSET` when make script is gathering `.wolfboot-offset` and `.wolfboot-partition-size` files. Updates to Target.md. Cleanups to test tools. 2019-06-07 14:17:15 -07:00
David Garske 0f00f8e700 SiFive HiFive (FE310) RISC-V support
* HiFive1 HAL Support for PLL Clock, UART, RTC and Flash QSPI Erase/Write.
* HiFive1 update demo application for accepting firmware updates over UART.
* Added test-update-server application for pushing firmware image over UART.
* Fixes for building with `make SIGN=ECC256`.
* Improvements to wolfCrypt `user_settings.h`.
* General library cleanup (license headers and formatting)
* Updated the wolfSSL submodule to latest.
* Documentation updates including new `Targets.md` section for hardare instructions.
2019-06-07 13:08:15 -07:00
Daniele Lacamera b918014203 Multi-platform test application, added K82 to Kinetis port 2019-04-04 16:31:45 +02:00
Daniele Lacamera b5fd49a82a Initial experimental support for RISC-V
- New Makefile to support multiple architectures
- Separate architecture-specific start-up files
- Stub for a hifive1 HAL port
2019-04-01 14:01:14 +02:00