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

nrf_security: drivers: cracen: Add support for kmu push area to be defined from device tree. #19896

Closed

Conversation

rob-robinson-14
Copy link
Contributor

Currently kmu push area must be explicitly defined in linker script.

With "zephyr,memory-region" it is possible to define this
region in the device tree and reference the node in kmu.c.

Signed-off-by: Rob Robinson robert.robinson@nordicsemi.no

@rob-robinson-14 rob-robinson-14 requested a review from a team as a code owner January 14, 2025 12:35
@CLAassistant
Copy link

CLAassistant commented Jan 14, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Jan 14, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jan 14, 2025

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 2

Inputs:

Sources:

sdk-nrf: PR head: 0b2f49259f104898b6e29ec364e592bd0caf802c

more details

sdk-nrf:

PR head: 0b2f49259f104898b6e29ec364e592bd0caf802c
merge base: c361c8ac4ab828a90edb02a59cd982de05f4d818
target head (main): 7ef6f396d33396235c8e2455d4c9f08aabe77efc
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (1)
subsys
│  ├── nrf_security
│  │  ├── src
│  │  │  ├── drivers
│  │  │  │  ├── cracen
│  │  │  │  │  ├── cracenpsa
│  │  │  │  │  │  ├── src
│  │  │  │  │  │  │  │ kmu.c

Outputs:

Toolchain

Version: 11349092be
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:11349092be_912848a074

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 1642
  • ✅ Integration tests
    • ✅ test-fw-nrfconnect-chip
    • ✅ test-fw-nrfconnect-nrf_crypto
    • ✅ test-fw-nrfconnect-tfm
    • ✅ test-sdk-find-my
    • ✅ test-sdk-sidewalk
    • ✅ test-sdk-dfu
    • ⚠️ test-fw-nrfconnect-nrf-iot_cloud
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_nrf_provisioning
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

…dtsi

Currently kmu push area must be explicitly defined in linker script.
With "zephyr,memory-region" it is possible to define this
region in the device tree and then reference the node in kmu.c.

Signed-off-by: Rob Robinson <robert.robinson@nordicsemi.no>
Copy link
Contributor

@Vge0rge Vge0rge left a comment

Choose a reason for hiding this comment

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

We already have two different ways of doing this.

One is in Zephyr:
https://github.com/nrfconnect/sdk-zephyr/blob/main/soc/nordic/nrf54l/kmu_push_area_section.ld

And one is in TF-M:
https://github.com/nrfconnect/sdk-trusted-firmware-m/blob/3f08f2595d976624e42478bb377cb24798b00a5d/platform/ext/common/gcc/tfm_common_s.ld#L290

I really don't want to add a third way of doing this, it makes the solution more error prone and if this doesn't work properly it will be a major issue.

I don't object using the dts for this but this needs to be at least universal for all devices in Zephyr.

I tried to use the reserved memory for the nRF54l15 use case as well but I could not make it work.

I propose to update the PR to use a linker file as well, the same way that we do it for nRF54l15. Then you can open a ticket to replace the linker files to DTS entries later.

@rob-robinson-14
Copy link
Contributor Author

Closing - Implemented by #20417

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants