Skip to content

Conversation

@ahasztag
Copy link
Contributor

This commit fixes the device not booting on
nrf54l15dk/nrf54l15/cpuapp/ns target when NSIB is used.

The issue was being a result of the SRAM used by B0 not being properly placed (at sram_nonsecure, while it should be at sram_secure). This resulted in KMU hardware errors.

@ahasztag ahasztag requested review from a team, nordicjm and tejlmand as code owners November 20, 2025 16:52
@NordicBuilder NordicBuilder added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Nov 20, 2025
Copy link

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

This PR fixes a boot failure on the nrf54l15dk/nrf54l15/cpuapp/ns target when NSIB (Nordic Secure Immutable Bootloader) is used. The root cause was B0's SRAM being incorrectly placed in the nonsecure region instead of the secure region, which caused KMU hardware errors.

Key changes:

  • Introduces CONFIG_SECURE_BOOT_IN_BUILD to track secure boot presence across the build system
  • Adds partition manager configuration to properly place B0's SRAM in the secure region
  • Ensures proper memory region allocation for the bootloader

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
sysbuild/CMakeLists.txt Sets the new CONFIG_SECURE_BOOT_IN_BUILD flag in the default image to signal secure boot presence
subsys/partition_manager/pm.yml.b0 Defines B0 SRAM partition spanning the secure SRAM region
subsys/partition_manager/CMakeLists.txt Conditionally includes B0 partition configuration when secure boot is in build
subsys/bootloader/Kconfig Defines the new CONFIG_SECURE_BOOT_IN_BUILD configuration option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@NordicBuilder NordicBuilder requested a review from a team November 20, 2025 16:52
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Nov 20, 2025

CI Information

To view the history of this post, click the 'edited' button above
Build number: 4

Inputs:

Sources:

sdk-nrf: PR head: 6b7a0f04d63acd7b6e8de14c551fa3edb8e12cc0

more details

sdk-nrf:

PR head: 6b7a0f04d63acd7b6e8de14c551fa3edb8e12cc0
merge base: 92c43d77512b4f19fc0ea3cad57bf9fd45f1a5e9
target head (main): 270cebc0718dd035605dfb9ae2ec809c46c83fec
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (2)
subsys
│  ├── partition_manager
│  │  ├── CMakeLists.txt
│  │  │ pm.yml.b0

Outputs:

Toolchain

Version: df3cc9d822
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:df3cc9d822_e595b21c39

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
  • ✅ Integration tests
    • ✅ test-sdk-audio - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ desktop52_verification - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-apps - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test_ble_nrf_config - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-ble_mesh
    • ✅ test-fw-nrfconnect-ble_samples
    • ✅ test-fw-nrfconnect-chip - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nfc - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_libmodem-nrf - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_zephyr_lwm2m - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_samples - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_lwm2m - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_thingy91 - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf_crypto - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-rpc - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-rs - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-fem - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-tfm - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-thread-main - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-find-my - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf_lrcs_positioning - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-wifi - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-low-level
    • ✅ test-sdk-mcuboot - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-dfu
    • ✅ test-fw-nrfconnect-ps-main - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-secdom-samples-public - Skipped: Job was skipped as it succeeded in a previous run
    • ⚠️ test-fw-nrfconnect-nrf-iot_cloud

Note: This message is automatically posted and updated by the CI

@github-actions
Copy link

You can find the documentation preview for this PR here.

@tomchy tomchy force-pushed the fix_nsib_tfm_nrf54l15 branch from 2f07c7b to 7acba95 Compare November 21, 2025 13:36
This commit fixes the device not booting on
nrf54l15dk/nrf54l15/cpuapp/ns target when NSIB is used.

The issue was being a result of the SRAM used by B0
not being properly placed (at sram_nonsecure, while
it should be at sram_secure). This resulted in KMU
hardware errors.

Signed-off-by: Artur Hadasz <[email protected]>
@tomchy tomchy force-pushed the fix_nsib_tfm_nrf54l15 branch from 7acba95 to 6b7a0f0 Compare November 24, 2025 11:24
Copilot AI review requested due to automatic review settings November 24, 2025 11:24
Copy link

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Nov 24, 2025

Memory footprint analysis revealed the following potential issues

applications.hpf.gpio.icbmsg[nrf54l15dk/nrf54l15/cpuflpr]: High RAM usage: 12744[B] - link (cc: @nrfconnect/ncs-ll-ursus)
applications.hpf.gpio.icbmsg[nrf54l15dk/nrf54l15/cpuflpr]: High ROM usage: 9492[B] - link (cc: @nrfconnect/ncs-ll-ursus)
applications.hpf.gpio.icmsg[nrf54l15dk/nrf54l15/cpuflpr]: High RAM usage: 9102[B] - link (cc: @nrfconnect/ncs-ll-ursus)
applications.hpf.gpio.icmsg[nrf54l15dk/nrf54l15/cpuflpr]: High ROM usage: 5858[B] - link (cc: @nrfconnect/ncs-ll-ursus)

Note: This message is automatically posted and updated by the CI (latest/sdk-nrf/PR-25708/4)

@tomchy tomchy merged commit 9a60557 into nrfconnect:main Nov 25, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants