Skip to content

Commit

Permalink
[nrf fromlist] tests: flash: Use a flash partition that is known to b…
Browse files Browse the repository at this point in the history
…e nonsecure

With TF-M enabled the storage_partition can be used as memory that is
known to be configured as non-secure flash region.
The slot1_ns_partition partition is only correct when TF-M is built
with BL2 enabled.

Upstream PR: zephyrproject-rtos/zephyr#66279

Signed-off-by: Joakim Andersson <[email protected]>
  • Loading branch information
joerchan authored and rlubos committed Dec 13, 2023
1 parent 4b2ae63 commit 1c92e08
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_FCB=y
CONFIG_FLASH_MAP=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_FCB=y
4 changes: 4 additions & 0 deletions tests/drivers/flash/common/boards/nrf9160dk_nrf9160_ns.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_FCB=y
CONFIG_FLASH_MAP=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_FCB=y
4 changes: 4 additions & 0 deletions tests/drivers/flash/common/boards/nrf9161dk_nrf9161_ns.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_FCB=y
CONFIG_FLASH_MAP=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_FCB=y
3 changes: 0 additions & 3 deletions tests/drivers/flash/common/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
#define TEST_AREA_DEV_NODE DT_INST(0, nordic_qspi_nor)
#elif defined(CONFIG_SPI_NOR)
#define TEST_AREA_DEV_NODE DT_INST(0, jedec_spi_nor)
#elif defined(CONFIG_TRUSTED_EXECUTION_NONSECURE)
/* SoC embedded NVM */
#define TEST_AREA slot1_ns_partition
#else
#define TEST_AREA storage_partition
#endif
Expand Down
2 changes: 1 addition & 1 deletion tests/drivers/flash/common/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tests:
drivers.flash.common.tfm_ns:
build_only: true
filter: (CONFIG_FLASH_HAS_DRIVER_ENABLED and CONFIG_TRUSTED_EXECUTION_NONSECURE
and dt_label_with_parent_compat_enabled("slot1_ns_partition", "fixed-partitions"))
and dt_label_with_parent_compat_enabled("storage_partition", "fixed-partitions"))
integration_platforms:
- nrf9161dk_nrf9161_ns
drivers.flash.common.stm32:
Expand Down

0 comments on commit 1c92e08

Please sign in to comment.