Remove RAM_KV partition; remove flash keyvault when not needed#733
Merged
dgarske merged 2 commits intowolfSSL:masterfrom Mar 23, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the legacy RAM_KV linker partition across multiple targets and updates example configs to disable the flash keyvault (size = 0) where it’s not required, while also adjusting partition sizing/alignment for MCXW.
Changes:
- Removed
RAM_KVmemory regions and the exported RAM keyvault linker symbols from multiple.ldscripts, reallocating that space intoRAM_HEAP. - Set
WOLFBOOT_KEYVAULT_SIZE?=0and adjusted addresses for certain TrustZone example configs so flash keyvault is disabled when not needed. - Repartitioned the MCXW non-TrustZone example to ensure partition sizes align with the sector size.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| hal/stm32u5.ld | Removes RAM_KV and RAM keyvault symbols; grows RAM_HEAP. |
| hal/stm32l5.ld | Removes RAM_KV and RAM keyvault symbols; grows RAM_HEAP. |
| hal/stm32h5.ld | Removes RAM_KV and RAM keyvault symbols; grows RAM_HEAP. |
| hal/nrf5340.ld | Removes RAM_KV and RAM keyvault symbols; grows RAM_HEAP. |
| hal/mcxw.ld | Removes RAM_KV and RAM keyvault symbols; grows RAM_HEAP. |
| hal/mcxn.ld | Removes RAM_KV and RAM keyvault symbols; grows RAM_HEAP. |
| hal/lpc55s69.ld | Removes RAM_KV and RAM keyvault symbols; grows RAM_HEAP. |
| config/examples/stm32u5.config | Disables flash keyvault and shifts keyvault/NSC address. |
| config/examples/stm32h5.config | Disables flash keyvault and shifts keyvault/NSC address. |
| config/examples/nrf5340-tz.config | Disables flash keyvault; moves NSC and app offset accordingly. |
| config/examples/mcxw.config | Adjusts MCXW partition sizing/addresses to sector multiples. |
| config/examples/mcxw-tz.config | Disables flash keyvault; updates NSC/partition sizing and offsets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dgarske
approved these changes
Mar 23, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
(Feel free to merge this after release if it's too late)
The
RAM_KVpartition is an old remnant that's not used anywhere, so I removed it. Keyvault RAM allocations are really done onRAM_HEAP.The flash keyvault partition is not needed in TrustZone targets that don't have
WOLFCRYPT_TZ_PKCS11orWOLFCRYPT_TZ_PSA, so I set its size to 0 on those targets.I also repartitioned the MCX W non-TrustZone config, because its partition size was not a multiple of the sector size.