Skip to content
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

sysbuild: Add Kconfig to load microcode once only on nRF54L devices #19676

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions sysbuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,23 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_cmake)
set(network_images)
endif()

if(SB_CONFIG_CRACEN_MICROCODE_LOAD_ONCE)
if(SB_CONFIG_CRACEN_MICROCODE_LOAD_B0)
set_config_bool(b0 CONFIG_CRACEN_LOAD_MICROCODE y)

if(SB_CONFIG_BOOTLOADER_MCUBOOT)
set_config_bool(mcuboot CONFIG_CRACEN_LOAD_MICROCODE n)
endif()
elseif(SB_CONFIG_CRACEN_MICROCODE_LOAD_MCUBOOT)
if(SB_CONFIG_SECURE_BOOT_APPCORE)
set_config_bool(b0 CONFIG_CRACEN_LOAD_MICROCODE n)
endif()

set_config_bool(mcuboot CONFIG_CRACEN_LOAD_MICROCODE y)
endif()

set_config_bool(${DEFAULT_IMAGE} CONFIG_CRACEN_LOAD_MICROCODE n)
endif()
endfunction(${SYSBUILD_CURRENT_MODULE_NAME}_pre_cmake)

function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_image_cmake)
Expand Down
39 changes: 39 additions & 0 deletions sysbuild/Kconfig.cracen
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause

config SUPPORT_CRACEN
bool
default y if SOC_SERIES_NRF54LX
help
Hidden symbol indicating if CRACEN is supported on the device.

if SUPPORT_CRACEN

menu "CRACEN"

config CRACEN_MICROCODE_LOAD_B0
bool
depends on SECURE_BOOT_APPCORE && SECURE_BOOT_SIGNATURE_TYPE_ED25519
default y
help
Hidden symbol indicating if b0 is using CRACEN.

config CRACEN_MICROCODE_LOAD_MCUBOOT
bool
depends on BOOTLOADER_MCUBOOT && BOOT_SIGNATURE_TYPE_ED25519
default y
help
Hidden symbol indicating if MCUboot is using CRACEN.

config CRACEN_MICROCODE_LOAD_ONCE
bool "Load CRACEN microcode once only"
depends on CRACEN_MICROCODE_LOAD_B0 || CRACEN_MICROCODE_LOAD_MCUBOOT
default y
help
If enabled, will only load microcode for CRACEN in the first system bootable image,
which will be either b0 or MCUboot, depending on project configuration.

endmenu

endif # SUPPORT_CRACEN
1 change: 1 addition & 0 deletions sysbuild/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,4 @@ rsource "Kconfig.suit_provisioning"
rsource "Kconfig.sdp"
rsource "Kconfig.approtect"
rsource "Kconfig.lwm2m_carrier"
rsource "Kconfig.cracen"
Loading