Commit Graph

176 Commits (db032d1461407a82b6dbc75a04c87725942a62a0)

Author SHA1 Message Date
David Garske b9949b0a0c For the hal_flash API's make the change to uintptr_t to support 64-bit explicit using `ARCH_64BIT` or known 64-bit architectures. 2023-08-07 20:54:18 +02: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
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
David Garske 3797238546 Documentation and code comment cleanups:
* Update documentation for signing with `--no-sign`, as the key argument should not be supplied.
* Recommend `make keysclean` instead of distclean on keys mismatch.
* Renesas headings/readme link and white-space.
2023-08-04 10:13:56 +02:00
Marco Oliverio c4ec5eef35 x86: support Intel FSP (TigerLake and QEMU) 2023-07-24 18:12:32 +00:00
Marco Oliverio 93b7281d12 x86: support MMU paging on x86 architecture 2023-07-24 18:12:14 +00:00
Marco Oliverio ab60ec47cb feature: support multiboot2 boot protocol 2023-07-24 18:12:14 +00:00
Marco Oliverio 30af6f617c x86: support Linux boot protocol for 32bit x86 architecture 2023-07-24 18:12:14 +00:00
Marco Oliverio bb93ce95d7 x86: MPTABLE: support multi processor table
BIOS uses this table to communiate IRQ routing and CPUs number to the OS.
2023-07-24 18:12:14 +00:00
Daniele Lacamera 5d6662af35 x86: GPT: support GUID Partition Table
support parsing the table and reading/writing to/from a partition.

Signed-off-by: Marco Oliverio <marco@wolfssl.com>
2023-07-24 18:12:14 +00:00
Daniele Lacamera dbf913deb0 x86: ATA: support ATA commands
support ATA commands to read, write and identify a SATA disk.

Signed-off-by: Marco Oliverio <marco@wolfssl.com>
2023-07-24 18:12:14 +00:00
Daniele Lacamera 8ed6dd3281 x86: AHCI: support AHCI
supports querying the ports, detecting the disk and configuring FIS areas.

Signed-off-by: Marco Oliverio <marco@wolfssl.com>
2023-07-24 18:12:14 +00:00
Marco Oliverio 8ce80d6a65 PCI: add initial support
It support basic enumeration (only bus 0), and reading/writing to config space
register.
2023-07-24 18:12:13 +00:00
Marco Oliverio 1e754ca8f5 x86: common I/O, MMIO and misc architecture specific functions 2023-07-24 18:12:13 +00:00
Marco Oliverio 9aee0b4cdd TPM: support WOLFTPM_MMIO 2023-07-24 18:12:13 +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
Marco Oliverio 0fd34f23c7 ELF: add mmu callback to map segments before loading 2023-07-24 18:12:13 +00:00
Daniele Lacamera 2600df9a21 Updated bootloader version 2023-07-06 14:17:52 +02:00
David Garske 1d6c421b41 Disable dynamic stack for SP math and SP math all. 2023-07-05 18:34:42 +02:00
Daniele Lacamera 17b948bd25 Added WOLFSSL_SP_NO_DYN_STACK to user_settings.h 2023-07-05 18:34:42 +02:00
Daniele Lacamera 180d819d4a Added WOLFSSL_SP_NO_DYN_STACK 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
Hideki Miyazaki 5ed7390c40 reorganize folders under IDE/Renesas 2023-06-10 08:53:32 +02:00
Takashi Kojo 6393c48860 print partition info 2023-06-10 08:53:32 +02:00
Takashi Kojo def2a530e4 Simple boot 2023-06-10 08:53:32 +02:00
Hideki Miyazaki 170bb9a585 Support Renesas RA6M4 with SCE use 2023-05-17 14:15:18 +02:00
billphipps 106b78086a
Merge pull request #302 from dgarske/nxp_tpm
Support for NXP P1021 eSPI and TPM (and fixes for eLBC NAND)
2023-05-10 20:17:27 -04:00
David Garske 28ee143a1b Update the new `spi_xfer` to include a "continue" flag to allow leaving the CS asserted. 2023-05-10 15:26:57 -07: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 bf3ebee8bb use correct digest when getting unsealing the pubkey
add deinit call when wolfboot exits so the TPM doesn't have a hanging session
2023-05-05 16:27:22 -04:00
David Garske fb20f2d41f Fix the eLBC NAND flash driver issues with page/col selection. Allow override of the `WOLFBOOT_SHA_BLOCK_SIZE`.
```
wolfBoot HAL Init
Flash Init: Ret 0, ID 0x76207620
Part: Active 0, Address 0
Boot partition: 200000
Image size 3964
Firmware Valid
Loading 3964 bytes to RAM at 1E000000
Booting at 1E000000
```
2023-05-05 12:18:16 -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 eb30566bba add encryption key unsealing from the tpm
make the config/examples/stm32f4-tpm-keystore.config config use ecc256
2023-04-24 13:23:09 -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
Daniele Lacamera 65635b3940 Updated version & README.md 2023-04-13 17:34:26 +02:00
John Bland 3fbc99d36e wolfTPM pubkey storage with policy based access restriction
this update uses the tpm to retreive the public key used to validate the image that will boot and restricts access to that key by tpm policy. when the image is updated it's signature is used to extend the PCR and when the image is loaded it's signature must match what was sealed in order to get the public key from the tpm. enabling this option is done by setting WOLFBOOT_TPM_KEYSTORE in .config
2023-04-11 11:46:21 -04: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 0b06efd347 Added unit test for encrypted external flash 2023-03-14 08:57:14 +01:00
Daniele Lacamera 2f2a6d416d Support encrypted images in MMU targets 2023-03-09 16:31:29 +01:00
David Garske cb1eaff8e8 Support for SP math with AARCH64 when hardware supports it. 2023-03-09 07:05:24 +01:00
David Garske 8dd0ee347f Support for the STM32 OCTOSPI peripheral. 2023-02-02 12:11:23 -08: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
Daniele Lacamera f250a5b5d4 Update wolfBoot version 2022-12-30 10:57:05 +01:00
David Garske e746c3f65a Fix for wolfBoot with wolfTPM. Tested with `cp ./config/examples/stm32wb-tpm.config .config && make clean && make`. 2022-12-28 19:15:50 +01:00
David Garske 8d7d4d4f74 Fixes for QSPI read. Adds alternate byte support. Cleanup of simple QSPI read/write. 2022-12-22 15:02:31 -08:00
David Garske 5331f5ee23 QSPI Flash tests passing in single SPI mode (working on Quad mode).
```
wolfBoot Init
Flash ID (ret 0): 0x1870EF, status 0
Erase Sector: Ret 0
Flash Write: Ret 0, Address 0x200000, Page 0, Len 256
Write Page: Ret 0
Flash Read: Ret 0, Address 0x200000, Len 256, Cmd 0xB
Read Page: Ret 0
Checking...
Flash Test Passed
```
2022-12-20 16:44:53 -08:00