-
Notifications
You must be signed in to change notification settings - Fork 153
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
Merged
Merged
Changes from all commits
Commits
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
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 */ |
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.