Skip to content

soc: nrf54l: Change logic for KMU reserved area #3180

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Vge0rge
Copy link
Contributor

@Vge0rge Vge0rge commented Aug 8, 2025

nrf-squash! [nrf noup] soc: nrf54l: Add custom section for KMU

Change how the KMU reserved area is included in the linker file. Now there is a separate Kconfig which shows it the there is a dts entry for the KMU
reserved area.

@@ -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 AND CONFIG_XIP)
if(NOT CONFIG_BUILD_WITH_TFM AND CONFIG_PSA_NEED_CRACEN_KMU_DRIVER AND NOT CONFIG_CRACEN_KMU_RESERVED_MEMORY_IN_DTS)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is referencing a Kconfig that does not exist in this repo, it exists in the sdk-nrf repo, would be better if it was defined in this repo but not a blocker issue since Kconfig checks are not performed here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is true but at the moment that is not possible. This already referenced an out of tree Kconfig (namely CONFIG_PSA_NEED_CRACEN_KMU_DRIVER). But to be honest that is not a big issue anyway, I will create a task to remove this linker integration all together and handle everything in dts.

Copy link
Contributor

@tomi-font tomi-font left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not possible to check the DT node directly rather than making a Kconfig option for it in sdk-nrf?

nrf-squash! [nrf noup] soc: nrf54l: Add custom section for KMU

Change how the KMU reserved area is included in the
linker file. Now there is a separate Kconfig which
shows it the there is a dts entry for the KMU
reserved area.

Signed-off-by: Georgios Vasilakis <[email protected]>
@Vge0rge
Copy link
Contributor Author

Vge0rge commented Aug 13, 2025

Not possible to check the DT node directly rather than making a Kconfig option for it in sdk-nrf?

I am not aware of any way to do that no. I searched a bit on the net and asked the AI gods but they cannot figure out this riddle either.

@nordicjm
Copy link
Contributor

Not possible to check the DT node directly rather than making a Kconfig option for it in sdk-nrf?

I am not aware of any way to do that no. I searched a bit on the net and asked the AI gods but they cannot figure out this riddle either.

what are you trying to do?

@Vge0rge
Copy link
Contributor Author

Vge0rge commented Aug 13, 2025

Not possible to check the DT node directly rather than making a Kconfig option for it in sdk-nrf?

I am not aware of any way to do that no. I searched a bit on the net and asked the AI gods but they cannot figure out this riddle either.

what are you trying to do?

In essence I am trying to access DTS information in cmake.

@nordicjm
Copy link
Contributor

Not possible to check the DT node directly rather than making a Kconfig option for it in sdk-nrf?

I am not aware of any way to do that no. I searched a bit on the net and asked the AI gods but they cannot figure out this riddle either.

what are you trying to do?

In essence I am trying to access DTS information in cmake.

yes that works fine, was more meaning show a dts snippet of what information you are trying to get

@Vge0rge
Copy link
Contributor Author

Vge0rge commented Aug 13, 2025

Not possible to check the DT node directly rather than making a Kconfig option for it in sdk-nrf?

I am not aware of any way to do that no. I searched a bit on the net and asked the AI gods but they cannot figure out this riddle either.

what are you trying to do?

In essence I am trying to access DTS information in cmake.

yes that works fine, was more meaning show a dts snippet of what information you are trying to get

	soc {
		reserved-memory {
			#address-cells = <1>;
			#size-cells = <1>;
			ranges;

			 nrf_kmu_reserved_push_area: memory@20000000 {
				reg = <0x20000000 0x80>;
				compatible = "zephyr,memory-region", "mmio-sram";
				zephyr,memory-region = "nrf_kmu_reserved_push_area";
				status = "okay";
			 };

		};
	};

Here, what the Kconfig does is that it checks if there is a node with the name nrf_kmu_reserved_push_area enabled. Are you aware of any methodology to do that in cmake directly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants