From 49a8a79862c4721fca17cd087cff6220f65e3325 Mon Sep 17 00:00:00 2001 From: Georgios Vasilakis Date: Tue, 7 Jan 2025 16:24:49 +0100 Subject: [PATCH 1/5] [nrf fromtree] tests: arm_irq_vector_table: Disable bellboard for nRF54/nRF92 This test uses the bellboard interrupts for the application and the radio core builds on nRF54H20 and nRF9280. Since it uses the bellboard interrupts it makes sense to ensure that bellboard is disabled in device tree to avoid runtime issues. This is preparation work, bellboard is planned to be enabled by default later and this makes sure that the test will continue to work. Signed-off-by: Georgios Vasilakis (cherry picked from commit 8ef1b348c20adaeb93e98b55d36a4cd749452a6e) --- .../boards/nrf54h20dk_nrf54h20_cpuapp.overlay | 13 +++++++++++++ .../boards/nrf54h20dk_nrf54h20_cpurad.overlay | 13 +++++++++++++ .../boards/nrf9280pdk_nrf9280_cpuapp.overlay | 13 +++++++++++++ .../boards/nrf9280pdk_nrf9280_cpurad.overlay | 13 +++++++++++++ 4 files changed, 52 insertions(+) create mode 100644 tests/arch/arm/arm_irq_vector_table/boards/nrf54h20dk_nrf54h20_cpuapp.overlay create mode 100644 tests/arch/arm/arm_irq_vector_table/boards/nrf54h20dk_nrf54h20_cpurad.overlay create mode 100644 tests/arch/arm/arm_irq_vector_table/boards/nrf9280pdk_nrf9280_cpuapp.overlay create mode 100644 tests/arch/arm/arm_irq_vector_table/boards/nrf9280pdk_nrf9280_cpurad.overlay diff --git a/tests/arch/arm/arm_irq_vector_table/boards/nrf54h20dk_nrf54h20_cpuapp.overlay b/tests/arch/arm/arm_irq_vector_table/boards/nrf54h20dk_nrf54h20_cpuapp.overlay new file mode 100644 index 00000000000..d1566b5aa63 --- /dev/null +++ b/tests/arch/arm/arm_irq_vector_table/boards/nrf54h20dk_nrf54h20_cpuapp.overlay @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&cpusec_cpuapp_ipc { + status = "disabled"; +}; + +&cpusec_bellboard{ + status = "disabled"; +}; diff --git a/tests/arch/arm/arm_irq_vector_table/boards/nrf54h20dk_nrf54h20_cpurad.overlay b/tests/arch/arm/arm_irq_vector_table/boards/nrf54h20dk_nrf54h20_cpurad.overlay new file mode 100644 index 00000000000..04c22168b6c --- /dev/null +++ b/tests/arch/arm/arm_irq_vector_table/boards/nrf54h20dk_nrf54h20_cpurad.overlay @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&cpusec_cpurad_ipc { + status = "disabled"; +}; + +&cpusec_bellboard{ + status = "disabled"; +}; diff --git a/tests/arch/arm/arm_irq_vector_table/boards/nrf9280pdk_nrf9280_cpuapp.overlay b/tests/arch/arm/arm_irq_vector_table/boards/nrf9280pdk_nrf9280_cpuapp.overlay new file mode 100644 index 00000000000..d1566b5aa63 --- /dev/null +++ b/tests/arch/arm/arm_irq_vector_table/boards/nrf9280pdk_nrf9280_cpuapp.overlay @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&cpusec_cpuapp_ipc { + status = "disabled"; +}; + +&cpusec_bellboard{ + status = "disabled"; +}; diff --git a/tests/arch/arm/arm_irq_vector_table/boards/nrf9280pdk_nrf9280_cpurad.overlay b/tests/arch/arm/arm_irq_vector_table/boards/nrf9280pdk_nrf9280_cpurad.overlay new file mode 100644 index 00000000000..04c22168b6c --- /dev/null +++ b/tests/arch/arm/arm_irq_vector_table/boards/nrf9280pdk_nrf9280_cpurad.overlay @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&cpusec_cpurad_ipc { + status = "disabled"; +}; + +&cpusec_bellboard{ + status = "disabled"; +}; From a8a71a99f17e6e079e9c79134f0930330a690d3e Mon Sep 17 00:00:00 2001 From: Georgios Vasilakis Date: Thu, 5 Sep 2024 10:41:36 +0200 Subject: [PATCH 2/5] [nrf noup] boards: nordic: Enable PSA RNG for nrf54h20 Noup since secdom is not available upstream and it is required for PSA RNG. This enables the PSA RNG as the default Zephyr entropy provider for the nrf54h20dk cpuapp and cpurad targets. Signed-off-by: Georgios Vasilakis --- .../nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts | 6 +++--- .../nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad.dts | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts index 06e642948f3..1b58861d7ee 100644 --- a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts @@ -26,7 +26,7 @@ zephyr,bt-hci = &bt_hci_ipc0; nordic,802154-spinel-ipc = &ipc0; zephyr,canbus = &can120; - zephyr,entropy = &prng; + zephyr,entropy = &psa_rng; }; aliases { @@ -108,8 +108,8 @@ }; }; - prng: prng { - compatible = "nordic,entropy-prng"; + psa_rng: psa-rng { + compatible = "zephyr,psa-crypto-rng"; status = "okay"; }; }; diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad.dts b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad.dts index 8734ff9f745..f57b00fceda 100644 --- a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad.dts +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad.dts @@ -27,16 +27,17 @@ zephyr,ieee802154 = &cpurad_ieee802154; zephyr,bt-hci-ipc = &ipc0; nordic,802154-spinel-ipc = &ipc0; - zephyr,entropy = &prng; - }; - prng: prng { - compatible = "nordic,entropy-prng"; - status = "okay"; + zephyr,entropy = &psa_rng; }; aliases { ipc-to-cpusys = &cpurad_cpusys_ipc; resetinfo = &cpurad_resetinfo; }; + + psa_rng: psa-rng { + compatible = "zephyr,psa-crypto-rng"; + status = "okay"; + }; }; &cpuapp_cpurad_ram0x_region { From 1593992332c1da312ddd331bd9060a661d1045d2 Mon Sep 17 00:00:00 2001 From: Georgios Vasilakis Date: Wed, 25 Sep 2024 14:32:43 +0200 Subject: [PATCH 3/5] [nrf noup] entropy: Add reqs for PSA RNG on nrf54h20 Noup since secdom is not available upstream and it is required for PSA RNG. This adds the Kconfig requirements for the PSA RNG service. This affects the nrf54h20dk cpuapp and cpurad targets. Signed-off-by: Georgios Vasilakis --- drivers/entropy/Kconfig.psa_crypto | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/entropy/Kconfig.psa_crypto b/drivers/entropy/Kconfig.psa_crypto index 18514a071d1..8a8cca6c56f 100644 --- a/drivers/entropy/Kconfig.psa_crypto +++ b/drivers/entropy/Kconfig.psa_crypto @@ -8,6 +8,7 @@ config ENTROPY_PSA_CRYPTO_RNG depends on DT_HAS_ZEPHYR_PSA_CRYPTO_RNG_ENABLED select ENTROPY_HAS_DRIVER select PSA_WANT_GENERATE_RANDOM + select SSF_PSA_CRYPTO_SERVICE_ENABLED if (SOC_SERIES_NRF54HX && !RISCV_CORE_NORDIC_VPR) default y help Enable the PSA Crypto source Entropy driver. From c72b822bc53f134d0305f748dd06e4edd58e6620 Mon Sep 17 00:00:00 2001 From: Georgios Vasilakis Date: Thu, 26 Sep 2024 13:39:35 +0200 Subject: [PATCH 4/5] [nrf noup] soc: nordic: Disable DCACHE for nrf54h20 When the PSA crypto secure domain service is enabled. Noup since this service is not available upstream. This is temporary since we expect to add support for data cache later. This affects the nrf54h20dk cpuapp and cpurad targets. Signed-off-by: Georgios Vasilakis --- soc/nordic/nrf54h/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soc/nordic/nrf54h/Kconfig b/soc/nordic/nrf54h/Kconfig index 10428b77ec7..724d9a395b5 100644 --- a/soc/nordic/nrf54h/Kconfig +++ b/soc/nordic/nrf54h/Kconfig @@ -16,7 +16,7 @@ config SOC_NRF54H20_CPUAPP_COMMON select CPU_CORTEX_M33 select CPU_HAS_ARM_MPU select CPU_HAS_ARM_SAU - select CPU_HAS_DCACHE + select CPU_HAS_DCACHE if !SSF_PSA_CRYPTO_SERVICE_ENABLED select CPU_HAS_ICACHE select CPU_HAS_FPU select CPU_HAS_CUSTOM_FIXED_SOC_MPU_REGIONS @@ -43,7 +43,7 @@ config SOC_NRF54H20_CPURAD_COMMON select CPU_CORTEX_M33 select CPU_HAS_ARM_MPU select CPU_HAS_ARM_SAU - select CPU_HAS_DCACHE + select CPU_HAS_DCACHE if !SSF_PSA_CRYPTO_SERVICE_ENABLED select CPU_HAS_ICACHE select CPU_HAS_FPU select CPU_HAS_CUSTOM_FIXED_SOC_MPU_REGIONS From 1d2bc44e21a8e52353bcd6895a13aaadcb4d2236 Mon Sep 17 00:00:00 2001 From: Georgios Vasilakis Date: Tue, 1 Oct 2024 13:17:13 +0200 Subject: [PATCH 5/5] [nrf noup] tests: Disable mbedtls legacy for 54H20 Disable the mbedtls legacy tests for the nRF54H20. We now enable the PSA entropy driver for the nRF54H20 which is incompatible with the mbedtls legacy APIs. Noup since we only enable the PSA entropy driver in NCS and not upstream. Signed-off-by: Georgios Vasilakis --- tests/crypto/mbedtls/testcase.yaml | 5 ++++- tests/crypto/mbedtls_psa/testcase.yaml | 3 ++- tests/crypto/secp256r1/testcase.yaml | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/crypto/mbedtls/testcase.yaml b/tests/crypto/mbedtls/testcase.yaml index 9b89364da93..8c4c49c2934 100644 --- a/tests/crypto/mbedtls/testcase.yaml +++ b/tests/crypto/mbedtls/testcase.yaml @@ -8,7 +8,10 @@ common: timeout: 400 tests: crypto.mbedtls: - platform_exclude: m2gl025_miv + platform_exclude: + - m2gl025_miv + - nrf54h20dk/nrf54h20/cpuapp + - nrf54h20dk/nrf54h20/cpurad extra_configs: - CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=0 - arch:riscv64:CONFIG_ZTEST_STACK_SIZE=8192 diff --git a/tests/crypto/mbedtls_psa/testcase.yaml b/tests/crypto/mbedtls_psa/testcase.yaml index 187e25b1976..426c6d9bd52 100644 --- a/tests/crypto/mbedtls_psa/testcase.yaml +++ b/tests/crypto/mbedtls_psa/testcase.yaml @@ -15,7 +15,8 @@ # latter case will allow to test # CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG_ALLOW_NON_CSPRNG. common: - filter: not CONFIG_BUILD_WITH_TFM + filter: not CONFIG_BUILD_WITH_TFM and + not CONFIG_PSA_SSF_CRYPTO_CLIENT tags: - mbedtls - psa diff --git a/tests/crypto/secp256r1/testcase.yaml b/tests/crypto/secp256r1/testcase.yaml index 0e21e0d86b5..0063ccbbffd 100644 --- a/tests/crypto/secp256r1/testcase.yaml +++ b/tests/crypto/secp256r1/testcase.yaml @@ -3,7 +3,9 @@ common: CONFIG_CSPRNG_ENABLED and CONFIG_HARDWARE_DEVICE_CS_GENERATOR and not CONFIG_BUILD_WITH_TFM and - not (CONFIG_MBEDTLS and CONFIG_TINYCRYPT) + not (CONFIG_MBEDTLS and CONFIG_TINYCRYPT) and + not CONFIG_PSA_SSF_CRYPTO_CLIENT + tags: - mbedtls - tinycrypt