Commit Graph

170 Commits (8a7f5e5baafacab6071051d223924b22d56231bb)

Author SHA1 Message Date
David Garske 8a7f5e5baa Refactor to eliminate PLATFORM_ -> TARGET_. Fix CI errors. 2024-08-14 18:06:12 +02:00
David Garske 3687851f75 Xilinx zynqmp documentation cleanups. Fixes for building with Eclipse wildcard .c include pains. 2024-08-14 18:06:12 +02:00
Daniele Lacamera 30a1f67e43
Added 32bit simulator via TARGET=sim FORCE_32BIT=1 (#485)
* Added 32bit simulator via TARGET=sim FORCE_32BIT=1

Tests can now run on 32bit simulator (e.g. to match XMALLOC fixed
sizes with sp_math and WOLFBOOT_SMALL_STACK).

* Added draft for new workflow: test simulator with different memory config

* Fix 64bit, SMALL_STACK xmalloc sizes

* Test defaults to SPMATH

* Fixed test: defaults to spmath. Added RSA tests (failing)

* Fixed RSA allocation sizes for 64bit build

* Added 64bit fastmath test (failing)

* Fixed ecc_point size for 64bit builds (FASTMATH)

* simulator config: use SPMATH by default

* Attempt to fix i386 libc dep in workflow

* Added HUGE_STACK to silence warning in FASTMATH+RSA4096 tests
2024-08-09 06:46:15 -07:00
Daniel Fedai Larsen ca09a1ab99 Add HAB support irrespective of MCUSDK setting for imx_rt target 2024-07-29 07:53:22 +02:00
David Garske 3f3a3ec47a Fix for Renesas RX hal_flash_write where length is < 128. 2024-07-25 06:17:38 +02:00
Daniele Lacamera e081d74623 Moving target-specific options to arch.mk 2024-07-22 08:33:52 +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
David Garske 83359a2b1e Added RT1062 EVKB support and tested on real hardware. Updated documentation. 2024-07-03 14:58:04 -07:00
David Garske de9a3cd0bf Fix with PKA=1 were fsl_cache is added twice. 2024-07-03 14:52:16 -07:00
Daniel Fedai Larsen 9526fbb680 Fix compile error and clean up 2024-07-03 07:33:31 +02:00
Daniel Pouzzner 441200f469 fix: support DEBUG=0 build
* build lib/wolfssl/wolfcrypt/src/logging.o unconditionally,
* gate debug printing in do_tpm_selftest() appropriately,
* initialize top_address in src/boot_x86_fsp.c:start() to fix -Wmaybe-uninitialized,
* and add __attribute__((used)) to static src/x86/exceptions.c:common_exception_handler() and _timer_handler() implementations to accommodate asm-only calling;
* fix parallel make: add dependency of stage1/loader_stage1.bin on wolfboot.elf.
* add -ffreestanding -static flags to avoid gcc compiler optimize strings functions

Co-authored-by: Daniel Pouzzner <douzzer@wolfssl.com>
2024-06-19 09:47:06 +02:00
Marco Oliverio bf55ac1ab5 x86_efi: fixes
- do not use a custom section for the keystore as it will not be loaded in the
UEFI env
- remove and disable WOLFBOOT_LOAD_ADDRESS
- copy .rodata from .elf to .efi as the new version of gnu-efi ld scripts do
not merge .rodata into .data anymore
- fix typo in compile_efi_linux.sh
2024-05-20 17:03:16 +02:00
David Garske 027c6847e5
Merge pull request #443 from wolfSSL/x86_fsp_backport
x86 fsp backport
2024-05-09 07:46:56 -07:00
Daniele Lacamera 3ec982109c STM32H5: added support for TrustZone
- Unified TZ support for STM32L5, STM32H5, STM32U5
- Fixed/added example configuration files
- Expanded documentation
- Added new configurations to automated tests
2024-05-09 16:33:40 +02:00
Daniele Lacamera 19fdbb8998 Initial support for STM32H5, sunny day boot
STM32H5: Tested sunny day boot

- Temporarily decreased clock speed to 125MHz
- Test app working
- Re-mapped Nucleo board LEDs
- Tested on STM32H563ZI
2024-05-09 16:28:06 +02:00
David Garske 672e90bb32
Merge pull request #445 from MulattoKid/imxrt_dcp
Fix compilation issues when using PKA=1 for i.MX RT targets
2024-04-29 11:03:39 -07:00
Marco Oliverio 0b5f7180cf fsp: mk: remove --print-gc-sections flag to reduce build output 2024-04-29 09:53:49 +02:00
Marco Oliverio 0aa886783f fsp: support stage2_get_parameters() helper 2024-04-29 09:53:49 +02:00
Marco Oliverio e96babef24 refactor: rename stage1.{h,c} in stage2_params.{h,c} 2024-04-29 09:53:49 +02:00
Marco Oliverio d0e6a7e990 x86_fsp: enable linker sections garbage collection
-ffunction-sections -fdata-sections compiles every function/data in its own
section, --gc-sections will remove the one that are unused.

Before:
$ ./tools/x86_fsp/print_flash_map.py
Name:                    Address:                    Size:
.stage2              0xffa00000           0x52cac
.policy              0xffa52cac           0x204
.config              0xffa52eb0           0x220
.ucode_update0       0xffd90000           0x1b000
.fit_table           0xffe00000           0x63000
.km                  0xffe80000           0x1000
.bpm                 0xffe90000           0x1000
.fsp_s               0xffea0000           0x5a200
.bootloader          0xfff00000           0x4f600
.iplt                0xfff4f600           0x0
.fsp_t               0xfff59000           0x7000
.fsp_m               0xfff60000           0x9f000
.jmpto32             0xfffffe00           0x158
.fit_table_tr        0xffffffc0           0x8
.reset_vector        0xffffffec           0x14
total sum: 0x222a44 (2186 KB)

After:
$ ./tools/x86_fsp/print_flash_map.py
Name:                    Address:                    Size:
.stage2              0xffa00000           0x2b24c
.policy              0xffa2b24c           0x204
.config              0xffa2b450           0x220
.ucode_update0       0xffd90000           0x1b000
.fit_table           0xffe00000           0x63000
.km                  0xffe80000           0x1000
.bpm                 0xffe90000           0x1000
.fsp_s               0xffea0000           0x5a200
.bootloader          0xfff00000           0x20900
.iplt                0xfff20900           0x0
.fsp_t               0xfff59000           0x7000
.fsp_m               0xfff60000           0x9f000
.jmpto32             0xfffffe00           0x158
.fit_table_tr        0xffffffc0           0x8
.reset_vector        0xffffffec           0x14
total sum: 0x1cc2e4 (1840 KB)
2024-04-29 09:53:49 +02:00
Marco Oliverio 94733b564c arch.mk: x86_fsp: be more precise with symbol parsing 2024-04-29 09:53:49 +02:00
Marco Oliverio 62c938f99d x86: tgl: remove binary FSP_S upd parameters
The parameters are configured in fsp_set_silicon_cfg
2024-04-29 09:53:49 +02:00
Marco Oliverio 4bbe43e222 x86: support cpu exceptions 2024-04-29 09:53:49 +02:00
Daniel Fedai Larsen cd92a9591f Fix compilation issues when using PKA=1 2024-04-26 07:36:55 +02:00
Marco Oliverio fd457e51a7 x86: fsp: move stage1 to stage2 related function in a separate file 2024-04-24 10:50:50 +02:00
Daniel Fedai Larsen 90e9d0585a Add support for MIMXRT1061CVJ5B 2024-04-22 07:44:52 +02:00
David Garske bc0d909d5c Fix for SP ASM (this MCX A Cortex-M33 apparently doesn't have `UMAAL` or is not compatible). Removed the NVM flash write once (not required). 2024-03-29 13:33:34 -07:00
Daniele Lacamera dfc53df909 Added support for NXP MCXA153 2024-03-29 10:25:08 +01:00
David Garske 11017d8af2
Merge pull request #405 from MulattoKid/mimxrt1040evk_support
Add support for MIMXRT1042XJM5B
2024-02-15 15:02:09 -08:00
Daniel Fedai Larsen 0f25c80114 Add support for MIMXRT1042XJM5B 2024-02-13 11:50:21 +01:00
David Garske 0b206d6758 Fixes for NXP T1024 with Integrity OS. Adds additional FDT fixups for FMAN, Ethernet, PCI. Add PCI init and enumeration. 2024-02-12 19:54:12 +01:00
David Garske 6ccf221483 Fixes for building TI Hercules. 2024-02-06 15:31:34 +01:00
David Garske dec26534c2 Workaround for building with optimizations enabled. Currently causes issues with alignment and inlining of functions that should not be (like string.c memcpy). 2024-01-17 14:16:15 +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 ac17c826b6 Added new config option NXP_CUSTOM_DCD_OBJS
+ Fix linker error due to wrong pointer type
2023-11-22 15:19:09 +01:00
Daniele Lacamera 0d614fc669 Added custom DCD for i.mx-RT10XX 2023-11-16 09:56:44 +01:00
David Garske a6fc952328 Improve C0/G0 secure hide protection feature documentation. 2023-10-13 14:34:01 +02:00
David Garske c4dfa3f986 PR cleanups based on peer review. Fixes to support < 10KB wolfBoot for either RSA2048 or ED25519. Partition scheme allows 10KB application partition or (6KB actual due to NVM write once). Made space using NO_MPU=1, RAM_CODE=0, USE_SLOW_SHA256 and !FLASH_SECURABLE_MEMORY_SUPPORT. 2023-10-13 14:34:01 +02:00
Bill Phipps a1d584b838 STM32C0 support 2023-10-13 14:34:01 +02:00
David Garske b3e2fb9ddd NXP T1024 wolfBoot support:
* Added DDR4 w/ECC.
* Added L2 and L2 CPC SRAM support
* Added platform SRAM 160KB support
* Added support for core timers (timebase) and platform clock.
* Added IFC driver with erase/write
* Added stage 1 loader to relocate wolfBoot to DDR
* Added CPLD, QUICC, FMAN and MP drivers
* Added eSPI driver for TPM.
* Added hal_early_init instead of calling ddr_init directly.
* Fixes for device tree (DTB) loading with update_ram and PPC boot.
* Fixes for relocating CCSRBAR to upper.
* Fixes for interrupt offsets.
2023-10-06 15:28:16 +02:00
David Garske 9cf947282c * Fix for building on MacOS (new keystore section issues).
* Fix for library.o workaround.
* Added new `WOLFBOOT_DEBUG_MALLOC` option to help diagnosing malloc failures.
2023-09-28 17:27:23 +02:00
Marco Oliverio 133479f212 fsp: defer SATA init in wolfBoot_start
In hal_init() TPM is not ready yet. SATA inti code needs TPM to unlock disk when
using TPM sealed secret based disk locking.
2023-09-28 13:12:26 +02:00
Daniele Lacamera b8a5a6243d Cleanup, config rename, documentation 2023-09-21 08:31:30 +02:00
Daniele Lacamera 291adfe87d Fixed merge of user_settings with new TPM logic 2023-09-21 08:31:28 +02:00
Daniele Lacamera fd862cbd8f Working PKCS11 test.
Temporarily removed some features so the image fits in 64Kb
2023-09-21 08:28:09 +02:00
Daniele Lacamera 5b57d2d08f PKCS11 store functions using wolfBoot hal 2023-09-21 07:57:18 +02:00
Daniele Lacamera e2ab9a5553 Unified TZ support for STM32L5/U5
- added file with common code
- added support for TRNG on U5
- added support for wolfcrypt NSC on U5
2023-09-21 07:57:18 +02:00
Daniele Lacamera fd809c5b69 Expanded WCS interface
- Added TRNG driver for STM32L5
- Link with correct objects in test-app
- Expanded wc_callable interface
2023-09-21 07:57:18 +02:00
Daniele Lacamera c7c90cd2cc Back-end calls for ecc sign/verify/getpublic 2023-09-21 07:57:18 +02:00
Daniele Lacamera 9bf80ab8cd Initial draft: wolfcrypt secure mode 2023-09-21 07:57:18 +02:00