Commit Graph

189 Commits (78e4275f99715bf66524aa9d480a33816d1a55a4)

Author SHA1 Message Date
Brett Nicholas 78e4275f99 Initial wolfHSM support for simulator and AURIX TC3xx 2024-11-13 09:52:49 +01:00
Daniele Lacamera cc447ea879 Support for hybrid authentication (2 ciphers) 2024-10-30 13:17:06 +01:00
Daniele Lacamera 72a0aa3853 Added Benchmark script. Added ARMASM support. 2024-10-24 21:20:09 +02:00
David Garske 63dd623ac8 Support for SPU to write protect bootloader flash region on application startup. 2024-10-11 10:29:59 +02:00
David Garske 322aa325b6 Consolidate duplicate TEST_FLASH code. 2024-10-11 10:29:59 +02:00
Daniele Lacamera bbd4e2b1c3 [SAMA5D3] Stub for test application 2024-09-30 14:06:06 +02:00
Daniele Lacamera 4cbfdf8cf1 [SAMA5D3] Port for 32bit Cortex-A 2024-09-30 14:05:50 +02:00
David Garske 8a7f5e5baa Refactor to eliminate PLATFORM_ -> TARGET_. Fix CI errors. 2024-08-14 18:06:12 +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 2082bd003c Avoid to silently overwrite keystore.c 2024-07-09 09:28:40 +02:00
Daniele Lacamera 213315507c Add command line tool to generate otp.bin 2024-07-09 08:42:33 +02:00
Marco Oliverio 0f8f30d6b8
Merge pull request #457 from danielinux/otp-regressions
Fix build OTP options
2024-06-26 12:07:02 +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
Daniele Lacamera 391e8d05d8 Fix build OTP options
- ARMORED option is not needed in otp_primer
- do not attempt to compile otp_primer if the option is not declared
2024-06-18 15:00:54 +02:00
David Garske 971cbe0ecc
Merge pull request #449 from danielinux/stm32h7_otp
Support for OTP Flash as trust anchor for keystore
2024-05-24 16:34:29 -07:00
Daniele Lacamera 8834e344a9 Fixed build error due to missing keystore.c in otp 2024-05-24 17:01:01 +02:00
Daniele Lacamera 75cd725c9d Fix linker warnings when building with otp 2024-05-24 16:37:25 +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
Daniele Lacamera 9dd8b7cf97 Renamed FLASH_OTP_ROT to FLASH_OTP_KEYSTORE 2024-05-15 10:55:47 +02:00
Daniele Lacamera 572e1157bc Added "otp-keystore-primer" tool 2024-05-15 10:55:46 +02:00
Daniele Lacamera d1eabc2e31 Keystore module for OTP in FLASH 2024-05-15 10:55:46 +02: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 e9d65b3bd2 Fixed TLV alignment for 8B fields
+ added sim "get_tlv" command
2024-03-08 18:40:34 +01:00
David Garske 6ccf221483 Fixes for building TI Hercules. 2024-02-06 15:31:34 +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 c3c6d21675 Added cppcheck --enable-portability, fixed UBs
Fixed reported UBs involving (void *) ptr arithmetic
2023-10-13 16:14:07 +02:00
Daniele Lacamera dcb82b6545 cppcheck: added "--enable=warning" 2023-10-13 16:08:22 +02:00
Daniele Lacamera ad2caeb67a Cppcheck: properly fail when finding errors 2023-10-13 15:49:12 +02:00
Daniele Lacamera 011fbe7296 Added basic cppcheck static analisys 2023-10-13 15:49:12 +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
Marco Oliverio b3465b5303 fsp: Makefile: avoid wolfboot.bin useless target 2023-10-02 15:20:39 +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
Daniele Lacamera f28eec1b90 stage1: add TPM support 2023-09-28 13:12:26 +02:00
Daniele Lacamera 291adfe87d Fixed merge of user_settings with new TPM logic 2023-09-21 08:31:28 +02:00
Daniele Lacamera 20e8b021b5 Added NS wrappers for PKCS11 API 2023-09-21 07:57:18 +02:00
Daniele Lacamera 5b57d2d08f PKCS11 store functions using wolfBoot hal 2023-09-21 07:57:18 +02:00
Daniele Lacamera 80f881dab5 Fixed STM32L5 TRNG driver + simplified GTZC and SAU setup 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 9bf80ab8cd Initial draft: wolfcrypt secure mode 2023-09-21 07:57:18 +02:00
Marco Oliverio d9d1492ec8 makefile: add inlcude/target.h dep to keytools target 2023-09-19 10:12:59 +00:00
David Garske c04960c097 Fix simulator to not just while(1) on panic, which causes CI to spin/timeout (instead exit with error). Fix ROT logic and make sure read error code gets passed up stack. 2023-09-12 12:26:48 +02:00
David Garske 2349a68e76 Added support for storing sealed blobs into NV. Refactor the TPM signature verify to use existing load public key function and generic verify hash TPM function. Added support for RSA sign with ASN.1 encoding (Example: `SIGN=RSA2048ENC`). 2023-09-12 12:26:48 +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
Marco Oliverio ef8f686760 Makefile: clean lib/wolfTPM/hal/*.o objects 2023-08-25 18:43:50 +02:00
Tesfa Mael 1fcac3557b Update makefile for SLOC 2023-08-22 07:18:15 +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 2f0e699f82 Fix for keytools with path having spaces. Added note about sign.c use of `WOLFBOOT_SECTOR_SIZE` for delta support. 2023-08-18 10:39:42 -07:00
Daniele Lacamera e6e3afa0f4 sign.c: Fixed delta file truncate-before-close 2023-08-17 17:04:02 +02:00
David Garske 9ca58248e4 Adding GitHub Action for testing TPM features. 2023-08-17 13:43:58 +02:00
David Garske 69adb25496 wolfBoot TPM improvements:
* Added TPM SPI wait state support and debug logging.
* Added platform auth ownership (change platform password to random value before boot). Can be disabled using `WOLFBOOT_TPM_NO_CHG_PLAT_AUTH`.
* Added parameter encryption support.
* Added TPM based root of trust based on https://github.com/wolfSSL/wolfTPM/pull/276
* Removed the TPM hashing feature (not practical).
* Fixed RSA with wolfTPM build.
* Fixed cleanup wolfTPM objects on make clean.
2023-08-17 13:43:58 +02:00