-
Notifications
You must be signed in to change notification settings - Fork 152
Add WOLFCRYPT_TZ_WOLFHSM TrustZone engine for STM32H5 #769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aidangarske
wants to merge
22
commits into
wolfSSL:master
Choose a base branch
from
aidangarske:h5-wolfhsm-port
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
6971c4b
Add WOLFCRYPT_TZ_WOLFHSM scaffolding for STM32H5
aidangarske ebc8b4b
Add wolfHSM TrustZone server + NSC bridge for STM32H5
aidangarske 72b51f0
Test on H5 HW wire WOLFBOOT_TZ_TEST_NO_BKPT make-flag through CFLAGS
aidangarske 823d3ce
Phase 1 cleanup: drop debug-era artifacts and Phase labels
aidangarske 29279c3
Phase 2: SHA256 + AES cached-key round-trips through the bridge
aidangarske c243b71
Phase 3: flash-backed NVM via whFlashCb adapter over hal_flash_*
aidangarske 19d0bb7
Phase 3: keystore-persist test mirrors PKCS11's first/second-boot pat…
aidangarske e7c9f10
wolfhsm_flash_hal: model on psa_store sector-cache pattern for H5 ECC
aidangarske 292256e
Phase 4: docs/wolfHSM.md TZ section + CI lane for stm32h5-tz-wolfhsm
aidangarske 7d49de3
Phase 4: add wolfHSM section to STM32-TZ.md
aidangarske 1eff12c
WOLFCRYPT_TZ_WOLFHSM: Skoll review fixes + flash-adapter unit test
aidangarske 822fce2
WOLFCRYPT_TZ_WOLFHSM: review fixes and unit-test coverage
aidangarske c921a50
lib/wolfHSM: pin to wolfHSM PR 348 head for NSC transport
aidangarske 05baf4b
port/stmicro/stm32h5-tz-wolfhsm: convenience wrapper + CI to whTest_C…
aidangarske b7bffcf
wolfhsm: re-assert server connected in NSC veneer before dispatch
aidangarske 803b0b4
wolfhsm: size keycache to the wolfHSM test working set (9 + 3)
aidangarske 8e28c82
lib/wolfHSM: bump pin to PR 348 head (transport-only)
aidangarske 1312d42
ci: drop wolfHSM from per-PR TZ tests; covered by nightly in wolfHSM
aidangarske a9876a6
stm32h5-tz-wolfhsm: PR review fixes (static flash cfg, cmse arg check…
aidangarske 57be0ec
stm32h5-tz-wolfhsm: bind NSC transport via WH_TRANSPORT_NSC_*_CB macros
aidangarske 91c39c4
lib/wolfHSM: bump pin to NSC macro-initializer refactor
aidangarske dd4ee40
Merge remote-tracking branch 'upstream/master' into h5-wolfhsm-port-m…
aidangarske File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| ARCH?=ARM | ||
| TZEN?=1 | ||
| TARGET?=stm32h5 | ||
| SIGN?=ECC256 | ||
| HASH?=SHA256 | ||
| DEBUG?=0 | ||
| VTOR?=1 | ||
| CORTEX_M0?=0 | ||
| CORTEX_M33?=1 | ||
| NO_ASM?=0 | ||
| # Required: wolfBoot's mpu_init() (src/boot_arm.c) programs an MPU region for | ||
| # the wolfBoot flash whose layout does not cover this port's secure SRAM, which | ||
| # HardFaults secure boot. Keep the MPU off here until that is handled upstream. | ||
| NO_MPU=1 | ||
| EXT_FLASH?=0 | ||
| SPI_FLASH?=0 | ||
| ALLOW_DOWNGRADE?=0 | ||
| NVM_FLASH_WRITEONCE?=1 | ||
| WOLFBOOT_VERSION?=1 | ||
| V?=0 | ||
| SPMATH?=1 | ||
| RAM_CODE?=1 | ||
| DUALBANK_SWAP?=0 | ||
| WOLFBOOT_PARTITION_SIZE?=0xA0000 | ||
| WOLFBOOT_SECTOR_SIZE?=0x2000 | ||
| WOLFBOOT_KEYVAULT_ADDRESS?=0x0C040000 | ||
| WOLFBOOT_KEYVAULT_SIZE?=0x1C000 | ||
| WOLFBOOT_NSC_ADDRESS?=0x0C05C000 | ||
| WOLFBOOT_NSC_SIZE?=0x4000 | ||
| WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x08060000 | ||
| WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x0C100000 | ||
| WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x0C1A0000 | ||
| FLAGS_HOME=0 | ||
| DISABLE_BACKUP=0 | ||
| WOLFCRYPT_TZ=1 | ||
| WOLFCRYPT_TZ_WOLFHSM=1 | ||
| IMAGE_HEADER_SIZE?=1024 | ||
| ARMORED=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /* wcs_wolfhsm.h | ||
| * | ||
| * Copyright (C) 2026 wolfSSL Inc. | ||
| * | ||
| * This file is part of wolfBoot. | ||
| */ | ||
|
|
||
| #ifndef WOLFBOOT_WCS_WOLFHSM_H | ||
| #define WOLFBOOT_WCS_WOLFHSM_H | ||
|
|
||
| #include <stdint.h> | ||
| #include "wolfboot/wc_secure.h" | ||
|
|
||
| #ifdef WOLFCRYPT_TZ_WOLFHSM | ||
|
|
||
| int CSME_NSE_API wcs_wolfhsm_transmit(const uint8_t *cmd, uint32_t cmdSz, | ||
| uint8_t *rsp, uint32_t *rspSz); | ||
|
|
||
| void wcs_wolfhsm_init(void); | ||
|
|
||
| #endif /* WOLFCRYPT_TZ_WOLFHSM */ | ||
|
|
||
| #endif /* WOLFBOOT_WCS_WOLFHSM_H */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /* wolfhsm_flash_hal.h | ||
| * | ||
| * Copyright (C) 2026 wolfSSL Inc. | ||
| * | ||
| * This file is part of wolfBoot. | ||
| */ | ||
|
|
||
| #ifndef WOLFBOOT_WOLFHSM_FLASH_HAL_H | ||
| #define WOLFBOOT_WOLFHSM_FLASH_HAL_H | ||
|
|
||
| #ifdef WOLFCRYPT_TZ_WOLFHSM | ||
|
|
||
| #include <stdint.h> | ||
|
|
||
| #include "wolfhsm/wh_flash.h" | ||
|
|
||
| /* Per-call config / context for the adapter. base/size/partition_size are | ||
| * the only client-visible fields; the cache lives inside the static | ||
| * implementation in wolfhsm_flash_hal.c (mirroring psa_store.c). */ | ||
| typedef struct { | ||
| uint32_t base; | ||
| uint32_t size; | ||
| uint32_t partition_size; | ||
| } whFlashH5Ctx; | ||
|
|
||
| extern const whFlashCb whFlashH5_Cb; | ||
|
|
||
| #endif /* WOLFCRYPT_TZ_WOLFHSM */ | ||
|
|
||
| #endif /* WOLFBOOT_WOLFHSM_FLASH_HAL_H */ |
Submodule wolfHSM
updated
93 files
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.