Skip to content

Commit cf72a09

Browse files
committed
nrf_security: Allow setting the kmu reserved area with dts
The kmu_push_area was only allowed to be set with dts for the ram images. Now more images will use it and hence the dependency on RAM images is removed. Also create a Kconfig which depends on the dts entry so that it can be used in the build system. Signed-off-by: Georgios Vasilakis <[email protected]>
1 parent 3154f49 commit cf72a09

File tree

2 files changed

+4
-10
lines changed
  • subsys/nrf_security/src/drivers/cracen

2 files changed

+4
-10
lines changed

subsys/nrf_security/src/drivers/cracen/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ config CRACEN_NEED_MULTIPART_WORKAROUNDS
1919
config CRACEN_NEED_IKG_INTERRUPT_WORKAROUND
2020
def_bool SOC_NRF54LM20A || SOC_NRF54LV10A
2121

22+
config CRACEN_KMU_RESERVED_MEMORY_IN_DTS
23+
def_bool "$(dt_nodelabel_enabled,nrf_kmu_reserved_push_area)"
24+
2225
# Configure CRACEN_LOG_LEVEL
2326
module = CRACEN
2427
module-str = CRACEN

subsys/nrf_security/src/drivers/cracen/cracenpsa/src/kmu.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,7 @@ extern nrf_security_mutex_t cracen_mutex_symmetric;
3333

3434
#define KMU_PUSH_AREA_SIZE 64
3535

36-
/* When execution in place (CONFIG_XIP) is not enabled, which in practice means that when Zephyr is
37-
* built for a RAM loaded image, the Zephyr linker script always places the RAM loaded image in the
38-
* top address of the RAM and then loads the linker scripts defined with the Zephyr SECTION_PROLOGUE
39-
* macros. Using SECTION_PROLOGUE macros to set the address of the kmu_push_area is
40-
* incompatible with RAM loaded images. The Zephyr reserved-memory devicetree methodology works for
41-
* both use cases but it requires heavy updates of multiple devicetree files and overlays. In order
42-
* to support the RAM loaded images use cases faster initial support for reserving the memory of
43-
* nrf_kmu_reserved_push_area though devicetree is limited to RAM loaded images.
44-
*/
45-
#if DT_NODE_EXISTS(DT_NODELABEL(nrf_kmu_reserved_push_area)) && !CONFIG_XIP
36+
#if DT_NODE_EXISTS(DT_NODELABEL(nrf_kmu_reserved_push_area))
4637

4738
#include <zephyr/dt-bindings/memory-attr/memory-attr.h>
4839
#include <zephyr/linker/devicetree_regions.h>

0 commit comments

Comments
 (0)