diff --git a/samples/crypto/aes_cbc/Kconfig.sysbuild b/samples/crypto/aes_cbc/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/aes_cbc/Kconfig.sysbuild +++ b/samples/crypto/aes_cbc/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/aes_cbc/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/aes_cbc/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/aes_cbc/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/aes_ccm/Kconfig.sysbuild b/samples/crypto/aes_ccm/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/aes_ccm/Kconfig.sysbuild +++ b/samples/crypto/aes_ccm/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/aes_ccm/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/aes_ccm/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/aes_ccm/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/aes_ctr/Kconfig.sysbuild b/samples/crypto/aes_ctr/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/aes_ctr/Kconfig.sysbuild +++ b/samples/crypto/aes_ctr/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/aes_ctr/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/aes_ctr/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/aes_ctr/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/aes_gcm/Kconfig.sysbuild b/samples/crypto/aes_gcm/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/aes_gcm/Kconfig.sysbuild +++ b/samples/crypto/aes_gcm/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/aes_gcm/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/aes_gcm/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/aes_gcm/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/chachapoly/Kconfig.sysbuild b/samples/crypto/chachapoly/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/chachapoly/Kconfig.sysbuild +++ b/samples/crypto/chachapoly/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/chachapoly/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/chachapoly/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/chachapoly/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/ecdh/Kconfig.sysbuild b/samples/crypto/ecdh/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/ecdh/Kconfig.sysbuild +++ b/samples/crypto/ecdh/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/ecdh/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/ecdh/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/ecdh/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/ecdsa/Kconfig.sysbuild b/samples/crypto/ecdsa/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/ecdsa/Kconfig.sysbuild +++ b/samples/crypto/ecdsa/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/ecdsa/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/ecdsa/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/ecdsa/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/ecjpake/Kconfig.sysbuild b/samples/crypto/ecjpake/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/ecjpake/Kconfig.sysbuild +++ b/samples/crypto/ecjpake/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/ecjpake/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/ecjpake/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/ecjpake/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/eddsa/Kconfig.sysbuild b/samples/crypto/eddsa/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/eddsa/Kconfig.sysbuild +++ b/samples/crypto/eddsa/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/eddsa/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/eddsa/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/eddsa/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/hkdf/Kconfig.sysbuild b/samples/crypto/hkdf/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/hkdf/Kconfig.sysbuild +++ b/samples/crypto/hkdf/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/hkdf/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/hkdf/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/hkdf/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/hmac/Kconfig.sysbuild b/samples/crypto/hmac/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/hmac/Kconfig.sysbuild +++ b/samples/crypto/hmac/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/hmac/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/hmac/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/hmac/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/pbkdf2/Kconfig.sysbuild b/samples/crypto/pbkdf2/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/pbkdf2/Kconfig.sysbuild +++ b/samples/crypto/pbkdf2/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/pbkdf2/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/pbkdf2/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/pbkdf2/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/persistent_key_usage/Kconfig.sysbuild b/samples/crypto/persistent_key_usage/Kconfig.sysbuild index b0106d2aea6..210a0fb4bee 100644 --- a/samples/crypto/persistent_key_usage/Kconfig.sysbuild +++ b/samples/crypto/persistent_key_usage/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/persistent_key_usage/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/persistent_key_usage/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/persistent_key_usage/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/psa_tls/Kconfig.sysbuild b/samples/crypto/psa_tls/Kconfig.sysbuild index d192dec010f..b2c41e7c1a5 100644 --- a/samples/crypto/psa_tls/Kconfig.sysbuild +++ b/samples/crypto/psa_tls/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !BOARD_IS_NON_SECURE + default n if !BOARD_IS_NON_SECURE || SOC_SERIES_NRF53 source "share/sysbuild/Kconfig" diff --git a/samples/crypto/psa_tls/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/psa_tls/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..dc8a25feb7d --- /dev/null +++ b/samples/crypto/psa_tls/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,57 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +/ { + eth-rtt { + compatible = "segger,eth-rtt"; + }; +}; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x60000>; + }; + + slot0_ns_partition: partition@60000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x60000 0x98000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/psa_tls/boards/nrf54l15dk_nrf54l10_cpuapp_ns.overlay b/samples/crypto/psa_tls/boards/nrf54l15dk_nrf54l10_cpuapp_ns.overlay index 479c57514a9..90fa1922c5e 100644 --- a/samples/crypto/psa_tls/boards/nrf54l15dk_nrf54l10_cpuapp_ns.overlay +++ b/samples/crypto/psa_tls/boards/nrf54l15dk_nrf54l10_cpuapp_ns.overlay @@ -1,23 +1,89 @@ /* - * Copyright (c) 2025 Nordic Semiconductor + * Copyright (c) 2026 Nordic Semiconductor * * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +/delete-node/ &slot0_partition; +/delete-node/ &slot0_ns_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +/delete-node/ &sram0_s; +/delete-node/ &sram0_ns; + &rram_controller { /delete-node/ cpuflpr_sram; /delete-node/ cpuflpr_rram; }; -/* Adjust the cpuapp_sram to include the freed up cpuflpr_sram */ +/* Adjust cpuapp_sram to include the freed-up cpuflpr_sram (192 kB total) + * and rebalance the secure/non-secure split to 64 kB / 128 kB so the + * non-secure image (psa_tls needs ~115 kB of RAM) fits. + */ &cpuapp_sram { reg = <0x20000000 DT_SIZE_K(192)>; ranges = <0x0 0x20000000 0x20030000>; + + sram0_s: image_s@0 { + #address-cells = <1>; + #size-cells = <1>; + /* Secure image memory */ + reg = <0x0 DT_SIZE_K(64)>; + ranges = <0x0 0x0 DT_SIZE_K(64)>; + }; + + sram0_ns: image_ns@10000 { + #address-cells = <1>; + #size-cells = <1>; + /* Non-Secure image memory */ + reg = <0x10000 DT_SIZE_K(128)>; + ranges = <0x0 0x10000 DT_SIZE_K(128)>; + }; }; -/* Adjust the cpuapp_rram to include the freed up cpuflpr_rram */ +/* Adjust cpuapp_rram to include the freed-up cpuflpr_rram */ &cpuapp_rram { reg = <0x0 DT_SIZE_K(1024)>; + + partitions { + slot0_s_partition: partition@0 { + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + label = "image-0-nonsecure"; + reg = <0x40000 0xb6000>; + }; + + tfm_storage_partition: partition@f6000 { + compatible = "fixed-subpartitions"; + label = "tfm-storage"; + reg = <0xf6000 DT_SIZE_K(40)>; + ranges = <0x0 0xf6000 DT_SIZE_K(40)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(16)>; + }; + + tfm_otp_partition: partition@4000 { + label = "tfm-otp"; + reg = <0x4000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@6000 { + label = "tfm-ps"; + reg = <0x6000 DT_SIZE_K(16)>; + }; + }; + }; }; / { diff --git a/samples/crypto/psa_tls/boards/nrf54lv10dk_nrf54lv10_cpuapp_ns.conf b/samples/crypto/psa_tls/boards/nrf54lv10dk_nrf54lv10a_cpuapp_ns.conf similarity index 100% rename from samples/crypto/psa_tls/boards/nrf54lv10dk_nrf54lv10_cpuapp_ns.conf rename to samples/crypto/psa_tls/boards/nrf54lv10dk_nrf54lv10a_cpuapp_ns.conf diff --git a/samples/crypto/psa_tls/boards/nrf54lv10dk_nrf54lv10a_cpuapp_ns.overlay b/samples/crypto/psa_tls/boards/nrf54lv10dk_nrf54lv10a_cpuapp_ns.overlay new file mode 100644 index 00000000000..63bce4a76c1 --- /dev/null +++ b/samples/crypto/psa_tls/boards/nrf54lv10dk_nrf54lv10a_cpuapp_ns.overlay @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2026 Nordic Semiconductor + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/delete-node/ &slot0_partition; +/delete-node/ &slot0_ns_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +/delete-node/ &sram0_s; +/delete-node/ &sram0_ns; + +/* Rebalance the secure/non-secure SRAM split to 64 kB / 127 kB so the + * non-secure image (psa_tls needs ~115 kB of RAM) fits. nRF54LV10A has + * 192 kB total SRAM; 1 kB at the top is left unused to match the upstream + * TF-M layout. + */ +&cpuapp_sram { + sram0_s: image_s@0 { + #address-cells = <1>; + #size-cells = <1>; + /* Secure image memory */ + reg = <0x0 DT_SIZE_K(64)>; + ranges = <0x0 0x0 DT_SIZE_K(64)>; + }; + + sram0_ns: image_ns@10000 { + #address-cells = <1>; + #size-cells = <1>; + /* Non-Secure image memory */ + reg = <0x10000 DT_SIZE_K(127)>; + ranges = <0x0 0x10000 DT_SIZE_K(127)>; + }; +}; + +&cpuapp_rram { + partitions { + slot0_s_partition: partition@0 { + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + tfm_storage_partition: partition@40000 { + compatible = "fixed-subpartitions"; + label = "tfm-storage"; + reg = <0x40000 DT_SIZE_K(40)>; + ranges = <0x0 0x40000 DT_SIZE_K(40)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(16)>; + }; + + tfm_otp_partition: partition@4000 { + label = "tfm-otp"; + reg = <0x4000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@6000 { + label = "tfm-ps"; + reg = <0x6000 DT_SIZE_K(16)>; + }; + }; + + slot0_ns_partition: partition@4a000 { + label = "image-0-nonsecure"; + reg = <0x4a000 0xb3000>; + }; + }; +}; + +/ { + eth-rtt { + compatible = "segger,eth-rtt"; + }; +}; diff --git a/samples/crypto/rng/Kconfig.sysbuild b/samples/crypto/rng/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/rng/Kconfig.sysbuild +++ b/samples/crypto/rng/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/rng/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/rng/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/rng/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/rsa/Kconfig.sysbuild b/samples/crypto/rsa/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/rsa/Kconfig.sysbuild +++ b/samples/crypto/rsa/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/rsa/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/rsa/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/rsa/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/sha256/Kconfig.sysbuild b/samples/crypto/sha256/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/sha256/Kconfig.sysbuild +++ b/samples/crypto/sha256/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/sha256/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/sha256/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/sha256/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +}; diff --git a/samples/crypto/sha256/boards/nrf5340dk_nrf5340_cpuapp_ns_mcuboot.overlay b/samples/crypto/sha256/boards/nrf5340dk_nrf5340_cpuapp_ns_mcuboot.overlay new file mode 100644 index 00000000000..6fba88fa6f8 --- /dev/null +++ b/samples/crypto/sha256/boards/nrf5340dk_nrf5340_cpuapp_ns_mcuboot.overlay @@ -0,0 +1,82 @@ +/delete-node/ &slot0_s_partition; +/delete-node/ &slot0_ns_partition; +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; +/delete-node/ &tfm_storage_partition; + +&flash0 { + partitions { + boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "mcuboot"; + reg = <0x00000000 0x10000>; + }; + + slot0_partition: partition@10000 { + compatible = "zephyr,mapped-partition"; + label = "image-0"; + reg = <0x00010000 0x70000>; + ranges = <0x0 0x10000 0x70000>; + #address-cells = <1>; + #size-cells = <1>; + + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x00000000 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x00040000 0x30000>; + }; + }; + + slot1_partition: partition@80000 { + compatible = "zephyr,mapped-partition"; + label = "image-1"; + reg = <0x00080000 0x70000>; + ranges = <0x0 0x80000 0x70000>; + #address-cells = <1>; + #size-cells = <1>; + + slot1_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-1-secure"; + reg = <0x00000000 0x40000>; + }; + + slot1_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-1-nonsecure"; + reg = <0x00040000 0x30000>; + }; + }; + + tfm_ps_partition: partition@f0000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x000f0000 0x00004000>; + }; + + tfm_its_partition: partition@f4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x000f4000 0x00002000>; + }; + + tfm_otp_partition: partition@f6000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x000f6000 0x00002000>; + }; + + storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "storage"; + reg = <0x000f8000 0x00008000>; + }; + }; +}; diff --git a/samples/crypto/sha256/sample.yaml b/samples/crypto/sha256/sample.yaml index 924a05ba75e..72ecf30ba2c 100644 --- a/samples/crypto/sha256/sample.yaml +++ b/samples/crypto/sha256/sample.yaml @@ -91,13 +91,22 @@ tests: build_only: true extra_args: SB_CONFIG_BOOTLOADER_MCUBOOT=y platform_allow: - - nrf5340dk/nrf5340/cpuapp/ns - nrf52840dk/nrf52840 - nrf52833dk/nrf52833 integration_platforms: - - nrf5340dk/nrf5340/cpuapp/ns - nrf52840dk/nrf52840 - nrf52833dk/nrf52833 + # nRF5340 ns needs an MCUboot-compatible flash layout overlay, since the + # default board overlay (no-MCUboot) reclaims the boot_partition region. + sample.nrf_security.sha256.integration.nrf5340: + build_only: true + extra_args: + - SB_CONFIG_BOOTLOADER_MCUBOOT=y + - sha256_EXTRA_DTC_OVERLAY_FILE="boards/nrf5340dk_nrf5340_cpuapp_ns_mcuboot.overlay" + platform_allow: + - nrf5340dk/nrf5340/cpuapp/ns + integration_platforms: + - nrf5340dk/nrf5340/cpuapp/ns sample.newlib_libc.sha256: build_only: true extra_args: CONFIG_NEWLIB_LIBC=y diff --git a/samples/crypto/spake2p/Kconfig.sysbuild b/samples/crypto/spake2p/Kconfig.sysbuild index b32e4d51e1f..9f9f49d15bc 100644 --- a/samples/crypto/spake2p/Kconfig.sysbuild +++ b/samples/crypto/spake2p/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config PARTITION_MANAGER - default n if !((SOC_SERIES_NRF91 || SOC_SERIES_NRF53) && BOARD_IS_NON_SECURE) + default n if !(SOC_SERIES_NRF91 && BOARD_IS_NON_SECURE) source "share/sysbuild/Kconfig" diff --git a/samples/crypto/spake2p/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/crypto/spake2p/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 00000000000..49bacd2f08f --- /dev/null +++ b/samples/crypto/spake2p/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,51 @@ +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/delete-node/ &tfm_its_partition; +/delete-node/ &tfm_otp_partition; +/delete-node/ &tfm_ps_partition; + +&flash0 { + partitions { + slot0_s_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "image-0-secure"; + reg = <0x0 0x40000>; + }; + + slot0_ns_partition: partition@40000 { + compatible = "zephyr,mapped-partition"; + label = "image-0-nonsecure"; + reg = <0x40000 0xb8000>; + }; + + tfm_storage_partition: partition@f8000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-storage"; + reg = <0xf8000 DT_SIZE_K(32)>; + ranges = <0x0 0xf8000 DT_SIZE_K(32)>; + #address-cells = <1>; + #size-cells = <1>; + + tfm_its_partition: partition@0 { + compatible = "zephyr,mapped-partition"; + label = "tfm-its"; + reg = <0x0 DT_SIZE_K(8)>; + }; + + tfm_otp_partition: partition@2000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-otp"; + reg = <0x2000 DT_SIZE_K(8)>; + }; + + tfm_ps_partition: partition@4000 { + compatible = "zephyr,mapped-partition"; + label = "tfm-ps"; + reg = <0x4000 DT_SIZE_K(16)>; + }; + }; + }; +};