Skip to content

Commit 38c9f32

Browse files
committed
bootloader: Enable NSIB SB_CLEANUP_RAM for nRF54L
The SB_CLEANUP_RAM was being blocked by the EXT_APIs, which were enabled in the NSIB-s prj.conf There are currently no use cases for EXT_APIs for nRF54L and cleanup up RAM after NSIB finishes its work is an important feature, so the part enabling the EXT_APIs needed to be removed from the NSIB-s prj.conf However, backwards compatibility with applications working on nRF52 and nRF53 needed to be mantained, so the EXT_APIs are now enabled by default in KConfings for the NSIB image for these platforms. Note this change aligns with the EXT_APIs documentation - in the documentation it is not described how to enable the EXT_APIs in NSIB when adding a new custom EXT_API. Now, the template will ensure it is enabled in NSIB. Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
1 parent 502e8f1 commit 38c9f32

File tree

6 files changed

+7
-12
lines changed

6 files changed

+7
-12
lines changed

doc/nrf/libraries/security/bootloader/fw_info.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ External APIs
5151

5252
The firmware information structure allows for exchange of arbitrary tagged and versioned interfaces called *external APIs* (EXT_APIs).
5353

54+
.. note::
55+
The usage of EXT_APIs is currently only supported on nRF52 and nRF53 devices.
56+
5457
An EXT_API structure is a structure consisting of a header followed by arbitrary data.
5558
The header consists of the following information:
5659

samples/bootloader/prj.conf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ CONFIG_LOG_DEFAULT_LEVEL=0
1717
CONFIG_SECURE_BOOT_VALIDATION=y
1818
CONFIG_SECURE_BOOT_VALIDATION_LOG_LEVEL_INF=y
1919
CONFIG_SECURE_BOOT_STORAGE=y
20-
CONFIG_BL_ROT_VERIFY_EXT_API_ENABLED=y
21-
CONFIG_BL_SHA256_EXT_API_ENABLED=y
22-
CONFIG_BL_SECP256R1_EXT_API_ENABLED=y
23-
CONFIG_BL_VALIDATE_FW_EXT_API_ENABLED=y
24-
CONFIG_EXT_API_PROVIDE_EXT_API_ENABLED=y
2520
CONFIG_MAIN_STACK_SIZE=2048
2621
CONFIG_TIMEOUT_64BIT=n
2722

samples/bootloader/prj_minimal.conf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
#
66

77
CONFIG_B0_MIN_PARTITION_SIZE=y
8-
CONFIG_BL_ROT_VERIFY_EXT_API_ENABLED=y
9-
CONFIG_BL_SECP256R1_EXT_API_ENABLED=y
10-
CONFIG_BL_SHA256_EXT_API_ENABLED=y
11-
CONFIG_BL_VALIDATE_FW_EXT_API_ENABLED=y
12-
CONFIG_EXT_API_PROVIDE_EXT_API_ENABLED=y
138
CONFIG_FPROTECT=y
149
CONFIG_FW_INFO=y
1510
CONFIG_IS_SECURE_BOOTLOADER=y

subsys/bootloader/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ config SB_BPROT_IN_DEBUG
100100

101101
config SB_CLEANUP_RAM
102102
bool "Perform RAM cleanup"
103+
default y
103104
depends on !FW_INFO_PROVIDE_ENABLE
104105
depends on CPU_CORTEX_M4 || CPU_CORTEX_M33
105106
help

subsys/bootloader/bl_boot/bl_boot.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ static void __ramfunc jump_in(uint32_t reset)
139139
" bx r0\n"
140140
:
141141
: "r" (reset),
142-
"i" (CONFIG_SRAM_BASE_ADDRESS),
143-
"i" (CONFIG_SRAM_SIZE * 1024),
142+
"r" (CONFIG_SRAM_BASE_ADDRESS),
143+
"r" (CONFIG_SRAM_SIZE * 1024),
144144
"r" (CLEANUP_RAM_GAP_START),
145145
"r" (CLEANUP_RAM_GAP_SIZE),
146146
"i" (0)

subsys/fw_info/Kconfig.template.fw_info_ext_api

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ config $(EXT_API)_EXT_API_AT_LEAST_REQUIRED
4141

4242
config $(EXT_API)_EXT_API_ENABLED
4343
bool "Provide the $(EXT_API) EXT_API to other images"
44+
default y if IS_SECURE_BOOTLOADER && (SOC_SERIES_NRF52X || SOC_NRF5340_CPUAPP)
4445
select FW_INFO_PROVIDE_ENABLE
4546
help
4647
Provide this EXT_API to other images.

0 commit comments

Comments
 (0)