Skip to content

Commit

Permalink
[nrf noup] soc: nrf54l: Non-XIP KMU reserved memory fix
Browse files Browse the repository at this point in the history
nrf-squash! [nrf noup] soc: nrf54l: Add custom section for KMU

The linker script inclusion which places the KMU reserved
buffer on the top of RAM doesn't work for non-XIP builds.
The Zephyr linker script will firstly load the code for
an non-XIP build in RAM and then include this KMU related
linker script which results in an unpredictable placement
of the KMU reserved area and a failed build.

In order to support non-XIP builds the linker file is not
included and the a DTS reserved-memory entry should be used.

To limit the scope, the DTS reserved memory region
is currently only supported for non-XIP builds.

This is a noup since the KMU is not supported upstream.

Signed-off-by: Georgios Vasilakis <[email protected]>
  • Loading branch information
Vge0rge committed Feb 21, 2025
1 parent 107f9f0 commit 3fc1487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion soc/nordic/nrf54l/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ zephyr_include_directories(.)
# We need a buffer in memory in a static location which can be used by
# the KMU peripheral. The KMU has a static destination address, we chose
# this address to be 0x20000000, which is the first address in the SRAM.
if(NOT CONFIG_BUILD_WITH_TFM AND CONFIG_PSA_NEED_CRACEN_KMU_DRIVER)
if(NOT CONFIG_BUILD_WITH_TFM AND CONFIG_PSA_NEED_CRACEN_KMU_DRIVER AND CONFIG_XIP)
# Exclamation mark is printable character with the lowest number in ASCII table.
# We are sure that this file will be included first.
zephyr_linker_sources(RAM_SECTIONS SORT_KEY ! kmu_push_area_section.ld)
Expand Down

0 comments on commit 3fc1487

Please sign in to comment.