Skip to content

Remove RAM_KV partition; remove flash keyvault when not needed#733

Merged
dgarske merged 2 commits intowolfSSL:masterfrom
mattia-moffa:20260319-remove-ram-kv-partition
Mar 23, 2026
Merged

Remove RAM_KV partition; remove flash keyvault when not needed#733
dgarske merged 2 commits intowolfSSL:masterfrom
mattia-moffa:20260319-remove-ram-kv-partition

Conversation

@mattia-moffa
Copy link
Copy Markdown
Contributor

@mattia-moffa mattia-moffa commented Mar 23, 2026

(Feel free to merge this after release if it's too late)

The RAM_KV partition is an old remnant that's not used anywhere, so I removed it. Keyvault RAM allocations are really done on RAM_HEAP.

The flash keyvault partition is not needed in TrustZone targets that don't have WOLFCRYPT_TZ_PKCS11 or WOLFCRYPT_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.

@mattia-moffa mattia-moffa self-assigned this Mar 23, 2026
Copilot AI review requested due to automatic review settings March 23, 2026 14:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_KV memory regions and the exported RAM keyvault linker symbols from multiple .ld scripts, reallocating that space into RAM_HEAP.
  • Set WOLFBOOT_KEYVAULT_SIZE?=0 and 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 dgarske merged commit 6945b47 into wolfSSL:master Mar 23, 2026
373 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants