Skip to content

[CSA-CP][Silabs]Restructure Silabs Matter Provisioning implementation. (#74613) - #1268

Merged
Junior Martinez (jmartinez-silabs) merged 7 commits into
release_2.10-1.6.1from
csa-cp/provision_restructure
Oct 15, 2026
Merged

Junior Martinez (jmartinez-silabs) merged 7 commits into
release_2.10-1.6.1from
csa-cp/provision_restructure

Conversation

@jmartinez-silabs

Copy link
Copy Markdown
Contributor

Summary

Restructures the Provisioning implementation into a modular, platform-neutral
core library with injectable interfaces for storage, crypto, channel, and
reset handling.

Problem
  • Our Provisioning library mixed protocol/orchestration logic with
    platform-specific storage, crypto/attestation, and transport code.
  • That coupling forced:
    • Per-family library builds (MG24, SI917, …) that depended on
      Simplicity SDK / WiSeConnect.
    • A large, hard-to-maintain core that could not be swapped for
      custom storage or crypto without forking the library.
    • Silabs library could be broken by Matter sdk changes leading to build errors until the library is updated and published.
Solution
  • Split platform capabilities behind explicit interfaces consumed by the
    core:
    • IProvisionStorageReader / IProvisionStorageWriter (read-only vs
      provision/write lifecycle)
    • IProvisionCrypto (attestation key ops, hash, CSR, sign)
    • IProvisionChannel (byte transport for the provisioning protocol)
    • Optional reset handler via Manager::SetResetHandler
  • Only enable ProvisioningStorageReader implementation is required for a Silabs Matter device to work.
  • The proprietary provisioning core Library is now built as ABI-profile archives (m4-softfp, m33-hard, plus
    optional clang variants) instead of per-MCU-family libs; core no longer
    requires SiSDK/WiSeConnect.
  • Ship Silabs default implementations (storage reader/writer, PSA crypto,
    RTT/BLE channels) outside the core

Testing

  • Confirm Silabs matter device work without the our provisioning library utilizing only the ProvisionStorageReader implementation.
  • Verified Generator Firmware wiring for Silabs defaults
  • Manual / board validation: run a full provision session against rebuilt
    Generator Firmware for representative EFR32 (m33-hard) and SiWx917 (m4-softfp)
    targets to confirm read/write, CSR, and commit paths still succeed.
  • Confirm devices are commissionable to a matter fabric with the provisionned data and certificates.

@Sarthak-Shaha

Copy link
Copy Markdown
Contributor

A submodule bump in matter_extension should be able to also validate this change?

@jmartinez-silabs

Copy link
Copy Markdown
Contributor Author

sarthak shaha (@Sarthak-Shaha) It requires some component changes not just a bump.
One SiliconLabsSoftware/matter_extension#1147 is merged I will cherry-pick the same to release_2.10 and bring the matter_sdk bump too

@cursor

cursor Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

PR Summary

High Risk
Changes factory-data reads, DAC signing, Matter provider registration, OTA credential persistence, and provisioning transport—any regression affects commissioning and device attestation.

Overview
Refactors Silicon Labs factory-data and provisioning into read/write/crypto/channel pieces that plug into Provision Core via IProvisionStorageReader, IProvisionStorageWriter, IProvisionCrypto, and IProvisionChannel, instead of one monolithic Storage type.

Runtime wiring: MatterConfig registers ProvisionStorageReader for instance info, commissionable data, and DAC; when the provision channel (or multi-OTA writer path) is enabled, ProvisionManager gets the reader, writer, crypto, and BLE/RTT channel backends. BaseApplication and Zephyr factory-data builds use the reader for QR/setup payload; multi-OTA can persist attestation data through the writer and crypto.

Build/layout: GN provision:storage picks default vs flash backends, compiles in-tree ProvisionCryptoPSA/Mbed and platform channels, and links a single ABI-profile libProvision-*.a instead of per-SoC prebuilt crypto/storage libs. Large deleted ProvisionStorage* sources move into ProvisionStorageReader/Writer plus default/, flash/, and zephyr/ implementations.

Minor: OpenThread Silabs example debug optimization s → g; Kconfig mostly comment/whitespace edits including CHIP_FACTORY_DATA help text for ProvisionStorageReader.

Reviewed by Cursor Bugbot for commit d4e6940. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit d4e6940. Configure here.

Comment thread examples/lighting-app/silabs/openthread.gn
Comment thread examples/platform/silabs/BaseApplication.cpp
* Restructure our Provisioning implementation.

This commit restructures the Provisioning implementation to use a more modular
approach. Create interfaces splitting each feature into a separate class to call into the core library.
The core library is now much more concise and easier to maintain.
Offer implementations for each interface that are used by our platform.
User could implement their own version of the interfaces to use their own storage, crypto, etc.

* Add fix to issue found by copilot

* Fix some issues flagged by coderabbit

* Update OTAMultiImage to leverage new provision interface. Fix other misc issues

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Potential fix for pull request finding 'Remove trailing backtick from preprocessor directive'

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix a conercase with multiota

* Address reviewer comments

* Bump matter_support to commit merged in offical branch

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Fix for 917 provisionCrypto with provision flash

* [Silabs] Fix 917 Flash provisionStorage. Add condition statement to fix slc based builds

* Restyled by gn

---------

Co-authored-by: Restyled.io <commits@restyled.io>
@jmartinez-silabs

Copy link
Copy Markdown
Contributor Author

Last commit was only to bump matter_support to the merged sha. Merging once all silabs apps build are completed.

@jmartinez-silabs
Junior Martinez (jmartinez-silabs) merged commit f83f79e into release_2.10-1.6.1 Oct 15, 2026
86 checks passed
@jmartinez-silabs
Junior Martinez (jmartinez-silabs) deleted the csa-cp/provision_restructure branch October 15, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changing-git-submodules-on-purpose csa-cp This TAG indicates that this commit is a cherry-pick from a CSA commit.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants