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

nrf54l15dk: add TF-M (/ns) support #17463

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tomi-font
Copy link
Contributor

@tomi-font tomi-font commented Sep 24, 2024

Bring in changes needed in Zephyr and TF-M, and make needed adjustments.

Support for TF-M in nrf54l15pdk is removed at the same time.

test_crypto: PR-667
test_tfm: PR-175

@github-actions github-actions bot added manifest changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Sep 24, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Sep 24, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
matter nrfconnect/sdk-connectedhomeip@89eb37b (master) nrfconnect/sdk-connectedhomeip#484 nrfconnect/sdk-connectedhomeip#484/files
psa-arch-tests nrfconnect/sdk-psa-arch-tests@94a349d (main) nrfconnect/sdk-psa-arch-tests#4 nrfconnect/sdk-psa-arch-tests#4/files
trusted-firmware-m nrfconnect/sdk-trusted-firmware-m@9f68dae (main) nrfconnect/sdk-trusted-firmware-m#170 nrfconnect/sdk-trusted-firmware-m#170/files
zephyr nrfconnect/sdk-zephyr@8005d4e (main) nrfconnect/sdk-zephyr#2015 nrfconnect/sdk-zephyr#2015/files

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Sep 24, 2024

CI Information

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

Inputs:

Sources:

trusted-firmware-m: PR head: 8d75b83bf84f86feeb3bf02f4681c5d8400d9058
sdk-nrf: PR head: 92d20b5c6b356211589d65641d55ac1e9bf2627f
matter: PR head: ee2f147f51edac47ee878cb2d908c96d970ac72e
zephyr: PR head: 77891653e1707c96cb6d7d90eb1b94899ed5060a

more details

trusted-firmware-m:

PR head: 8d75b83bf84f86feeb3bf02f4681c5d8400d9058
merge base: 9f68daeafd7b662c96d6fdf61c83222248e3ed9f
target head (main): 9f68daeafd7b662c96d6fdf61c83222248e3ed9f
Diff

sdk-nrf:

PR head: 92d20b5c6b356211589d65641d55ac1e9bf2627f
merge base: ab3c57c3513ad309740eaaac0fc222413d35882e
target head (main): ab3c57c3513ad309740eaaac0fc222413d35882e
Diff

matter:

PR head: ee2f147f51edac47ee878cb2d908c96d970ac72e
merge base: 89eb37b47ca8e4b9d309c431bde30bdb19d07577
target head (master): 89eb37b47ca8e4b9d309c431bde30bdb19d07577
Diff

zephyr:

PR head: 77891653e1707c96cb6d7d90eb1b94899ed5060a
merge base: 8005d4e87b9bcba25f441a51f4f5d29b541022b9
target head (main): 8005d4e87b9bcba25f441a51f4f5d29b541022b9
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 (97)
doc
│  ├── nrf
│  │  ├── app_dev
│  │  │  ├── board_support
│  │  │  │  │ board_names.rst
│  │  ├── includes
│  │  │  │ sample_board_rows.txt
│  │  ├── releases_and_maturity
│  │  │  ├── releases
│  │  │  │  │ release-notes-changelog.rst
modules
│  ├── lib
│  │  ├── matter
│  │  │  ├── config
│  │  │  │  ├── nrfconnect
│  │  │  │  │  ├── chip-module
│  │  │  │  │  │  ├── Kconfig.defaults
│  │  │  │  │  │  │ Kconfig.features
│  ├── tee
│  │  ├── tf-m
│  │  │  ├── trusted-firmware-m
│  │  │  │  ├── platform
│  │  │  │  │  ├── ext
│  │  │  │  │  │  ├── target
│  │  │  │  │  │  │  ├── nordic_nrf
│  │  │  │  │  │  │  │  ├── common
│  │  │  │  │  │  │  │  │  ├── core
│  │  │  │  │  │  │  │  │  │  ├── CMakeLists.txt
│  │  │  │  │  │  │  │  │  │  ├── nrfx_config.h
│  │  │  │  │  │  │  │  │  │  ├── services
│  │  │  │  │  │  │  │  │  │  │  ├── src
│  │  │  │  │  │  │  │  │  │  │  │  │ tfm_platform_hal_ioctl.c
│  │  │  │  │  │  │  │  │  │  ├── startup_nrf54l15.c
│  │  │  │  │  │  │  │  │  │  ├── target_cfg.c
│  │  │  │  │  │  │  │  │  │  │ target_cfg.h
│  │  │  │  │  │  │  │  │  ├── nrf54l15
│  │  │  │  │  │  │  │  │  │  │ cpuarch.cmake
│  │  │  │  │  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp
│  │  │  │  │  │  │  │  │  ├── ns
│  │  │  │  │  │  │  │  │  │  ├── CMakeLists.txt
│  │  │  │  │  │  │  │  │  │  │ cpuarch_ns.cmake
│  │  │  │  │  │  │  │  │  │ tfm_peripherals_config.h
│  ├── trusted-firmware-m
│  │  ├── Kconfig.tfm.defconfig
│  │  ├── Kconfig.tfm.pm
│  │  ├── tfm_boards
│  │  │  ├── CMakeLists.txt
│  │  │  ├── board
│  │  │  │  │ device_cfg.h
│  │  │  ├── nrf54l15_cpuapp
│  │  │  │  │ CMakeLists.txt
samples
│  ├── crypto
│  │  ├── aes_cbc
│  │  │  │ sample.yaml
│  │  ├── aes_ccm
│  │  │  │ sample.yaml
│  │  ├── aes_ctr
│  │  │  │ sample.yaml
│  │  ├── aes_gcm
│  │  │  │ sample.yaml
│  │  ├── chachapoly
│  │  │  │ sample.yaml
│  │  ├── ecdh
│  │  │  │ sample.yaml
│  │  ├── ecdsa
│  │  │  │ sample.yaml
│  │  ├── ecjpake
│  │  │  │ sample.yaml
│  │  ├── eddsa
│  │  │  │ sample.yaml
│  │  ├── hkdf
│  │  │  │ sample.yaml
│  │  ├── hmac
│  │  │  │ sample.yaml
│  │  ├── pbkdf2
│  │  │  │ sample.yaml
│  │  ├── persistent_key_usage
│  │  │  │ sample.yaml
│  │  ├── psa_tls
│  │  │  ├── boards
│  │  │  │  │ nrf54l15dk_nrf54l15_cpuapp_ns.conf
│  │  │  │ sample.yaml
│  │  ├── rng
│  │  │  │ sample.yaml
│  │  ├── rsa
│  │  │  │ sample.yaml
│  │  ├── sha256
│  │  │  │ sample.yaml
│  │  ├── spake2p
│  │  │  │ sample.yaml
│  ├── matter
│  │  ├── light_bulb
│  │  │  ├── Kconfig.sysbuild
│  │  │  ├── boards
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp_ns.conf
│  │  │  │  │ nrf54l15dk_nrf54l15_cpuapp_ns.overlay
│  │  │  ├── pm_static_nrf54l15dk_nrf54l15_cpuapp_ns.yml
│  │  │  │ sample.yaml
│  │  ├── light_switch
│  │  │  ├── Kconfig.sysbuild
│  │  │  ├── boards
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp_ns.conf
│  │  │  │  │ nrf54l15dk_nrf54l15_cpuapp_ns.overlay
│  │  │  ├── pm_static_nrf54l15dk_nrf54l15_cpuapp_ns.yml
│  │  │  │ sample.yaml
│  │  ├── lock
│  │  │  ├── Kconfig.sysbuild
│  │  │  ├── boards
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp_ns.conf
│  │  │  │  │ nrf54l15dk_nrf54l15_cpuapp_ns.overlay
│  │  │  ├── pm_static_nrf54l15dk_nrf54l15_cpuapp_ns.yml
│  │  │  │ sample.yaml
│  │  ├── template
│  │  │  ├── Kconfig.sysbuild
│  │  │  ├── README.rst
│  │  │  ├── boards
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp_ns.conf
│  │  │  │  │ nrf54l15dk_nrf54l15_cpuapp_ns.overlay
│  │  │  ├── pm_static_nrf54l15dk_nrf54l15_cpuapp_ns.yml
│  │  │  │ sample.yaml
│  │  ├── thermostat
│  │  │  ├── Kconfig.sysbuild
│  │  │  ├── boards
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp_ns.conf
│  │  │  │  │ nrf54l15dk_nrf54l15_cpuapp_ns.overlay
│  │  │  ├── pm_static_nrf54l15dk_nrf54l15_cpuapp_ns.yml
│  │  │  │ sample.yaml
│  │  ├── window_covering
│  │  │  ├── Kconfig.sysbuild
│  │  │  ├── boards
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp_ns.conf
│  │  │  │  │ nrf54l15dk_nrf54l15_cpuapp_ns.overlay
│  │  │  ├── pm_static_nrf54l15dk_nrf54l15_cpuapp_ns.yml
│  │  │  │ sample.yaml
│  ├── tfm
│  │  ├── tfm_hello_world
│  │  │  │ sample.yaml
scripts
│  │ quarantine_integration.yaml
subsys
│  ├── nrf_security
│  │  ├── src
│  │  │  ├── drivers
│  │  │  │  ├── cracen
│  │  │  │  │  ├── cracenpsa
│  │  │  │  │  │  ├── src
│  │  │  │  │  │  │  │ blkcipher.c
│  ├── partition_manager
│  │  │ pm.yml.tfm
tests
│  ├── subsys
│  │  ├── bluetooth
│  │  │  ├── fast_pair
│  │  │  │  ├── crypto
│  │  │  │  │  │ testcase.yaml
│  ├── tfm
│  │  ├── tfm_psa_test
│  │  │  ├── boards
│  │  │  │  ├── nrf5340dk_nrf5340_cpuapp_ns.overlay
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp_ns.overlay
│  │  │  │  ├── nrf54l15pdk_nrf54l15_cpuapp_ns.overlay
│  │  │  │  ├── nrf9151dk_nrf9151_ns.overlay
│  │  │  │  ├── nrf9160dk_nrf9160_ns.overlay
│  │  │  │  │ nrf9161dk_nrf9161_ns.overlay
│  │  │  │ testcase.yaml
│  │  ├── tfm_regression_test
│  │  │  ├── boards
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp_ns.conf
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp_ns.overlay
│  │  │  │  ├── nrf9151dk_nrf9151_ns.overlay
│  │  │  │  │ nrf9161dk_nrf9161_ns.overlay
│  │  │  │ testcase.yaml
west.yml
zephyr
│  ├── boards
│  │  ├── nordic
│  │  │  ├── nrf54l15dk
│  │  │  │  ├── Kconfig
│  │  │  │  ├── Kconfig.defconfig
│  │  │  │  ├── Kconfig.nrf54l15dk
│  │  │  │  ├── board.cmake
│  │  │  │  ├── board.yml
│  │  │  │  ├── doc
│  │  │  │  │  │ index.rst
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp_ns.dts
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp_ns.yaml
│  │  │  │  │ nrf54l15dk_nrf54l15_cpuapp_ns_defconfig

Outputs:

Toolchain

Version: 9583beca34
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:9583beca34_81ed5a52d6

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

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

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

@tomi-font tomi-font force-pushed the security_tf-m_support_54l15dk branch 2 times, most recently from 12c5853 to a134757 Compare September 26, 2024 13:57
@github-actions github-actions bot added the doc-required PR must not be merged without tech writer approval. label Sep 26, 2024
@tomi-font tomi-font marked this pull request as ready for review September 26, 2024 13:58
@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

Copy link
Contributor

@kapi-no kapi-no left a comment

Choose a reason for hiding this comment

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

Approving the Fast Pair tests

@github-actions github-actions bot removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Sep 27, 2024
@@ -39,6 +39,7 @@ IDE, and tool support
Board support
=============

* Added TF-M support to the :ref:`nRF54L15 DK <zephyr:nrf54l15dk_nrf54l15>` (board target ``nrf54l15dk/nrf54l15/cpuapp/ns``), replacing the nRF54L15 PDK (board target ``nrf54l15pdk/nrf54l15/cpuapp/ns``).
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this is the correct place... Would it make more sense to have it under Security section?

Replacing the Moonlight PDK with DK on samples might be a good idea to mention as well, under the respective samples sections.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So it would instead be listed on every affected sample category? (for now TF-M, crypto and Matter)

Copy link
Contributor

Choose a reason for hiding this comment

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

That was the thought.
By the way, it looks like this is already done for Matter: https://github.com/nrfconnect/sdk-nrf/pull/17298/files (see release-notes-changelog.rst)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did that.

Copy link
Contributor

@greg-fer greg-fer left a comment

Choose a reason for hiding this comment

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

Adding @annwoj

| | | | |
| | | | ``nrf54l15pdk/nrf54l15/cpuapp/ns`` |
+-------------------+------------+-------------------------------------------------------------------+---------------------------------------+
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't PDK be removed at this point?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right! At least for the NS target of the PDK. (The whole PDK will be removed separately.)

Copy link
Contributor

Choose a reason for hiding this comment

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

Just an FYI - If there still will be some occurrences left in common articles for pdk targets I'll be doing a cleanup closer to the release date

@@ -207,7 +207,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/common
DESTINATION ${INSTALL_PLATFORM_NS_DIR})


if((NRF_SOC_VARIANT STREQUAL nrf54l15) OR (target STREQUAL nrf54l15))
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are you not using CONFIG_SOC_NRF54L15 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. I was not the one to introduce this. Here I just cleaned up the use of target that seemed useless. I guess NRF_SOC_VARIANT was used because it's defined in the TF-M CMake logic. There is likely no good reason for CONFIG_SOC_* to not be used instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay so actually there is. CONFIG_SOC_NRF54L15 is not defined in there, so it doesn't work. I'm reverting to using NRF_SOC_VARIANT.

Copy link
Contributor

Choose a reason for hiding this comment

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

If introducing a common app.overlay then such a file should be generic enough to generally be able to cover majority of boards.

Having the existing (duplicated) nrf5340dk_nrf5340_cpuapp_ns.overlay and `nrf9160dk_nrf9160_ns.overlay makes it clear for which boards those overlays are intended.

The nRF54l15 requires a different overlay, and probably also the nRF54h20 (btw why is the no nrf54h20 overlay ?)

Dedicated overlays makes it clearer to downstream users creating custom boards that they need a similar overlay for their custom board compared to a generic app.overlay which doesn't indicates for which boards it is intended.

afaict the app.overlay doesn't appear to be so common, so I would like a good reason why this change is valuable, especially seen from our user's perspective.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason why this change was just to reduce duplication. You have a fair point, I reverted this and added some DT overlay files that were missing in tfm_regression_test.

(btw why is the no nrf54h20 overlay ?)

Apparently because the 54H20 is not supported. I don't know exactly.

Bring in changes needed in Zephyr and TF-M, and make needed
adjustments.

Support for TF-M in `nrf54l15pdk` is removed at the same time.

Signed-off-by: Tomi Fontanilles <[email protected]>
Put common stuff in the `common` section.
Also add the `nrf54l15dk/nrf54l15/cpuapp/ns` platform to the
`tfm.psa_test_crypto_lvl2` test.

Signed-off-by: Tomi Fontanilles <[email protected]>
Return an error instead of triggering an assert when `output` is NULL.
This is to prevent PSA arch tests from hanging because of this.

Signed-off-by: Tomi Fontanilles <[email protected]>
Remove the remaining `app.overlay` as it doesn't fit all the boards.
In addition, make sure that there are DT overlay files for every
supported board.

Signed-off-by: Tomi Fontanilles <[email protected]>
@tomi-font tomi-font force-pushed the security_tf-m_support_54l15dk branch from 2f455d8 to 92d20b5 Compare October 3, 2024 12:54
@tomi-font
Copy link
Contributor Author

Addressed the latest comments and rebased.

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

Successfully merging this pull request may close these issues.

8 participants