Skip to content

Commit c158179

Browse files
committed
[nrf fromtree] platform: nordic_nrf: Configure NRF53 RPMSG NS region
The nRF5340 uses the RPMSG region for communication between the application and the network core over IPC. The network core is configured as non secure so in order to allow communication between the two cores this region needs to be configured as non secure as well. This adds the configuration of the region if the partition manager defined a region for it. Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no> Change-Id: I3821967e83dacbd100fecd9f6afa1b3230910c0d (cherry picked from commit fae599ed05ba409d17ba5e050b4ff29276150695)
1 parent 902f58b commit c158179

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

platform/ext/target/nordic_nrf/common/core/target_cfg_53_91.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,17 @@ enum tfm_plat_err_t spu_init_cfg(void)
228228
SPU_SECURE_ATTR_NONSECURE, perm, SPU_LOCK_CONF_LOCKED);
229229
#endif /* REGION_PCD_SRAM_ADDRESS */
230230

231+
#ifdef REGION_RPMSG_NRF53_SRAM_ADDRESS
232+
/* Configures rpmsg nrf53 partition to be non-secure */
233+
perm = 0;
234+
perm |= NRF_SPU_MEM_PERM_READ;
235+
perm |= NRF_SPU_MEM_PERM_WRITE;
236+
237+
spu_regions_sram_config(REGION_RPMSG_NRF53_SRAM_ADDRESS,
238+
REGION_RPMSG_NRF53_SRAM_LIMIT,
239+
SPU_SECURE_ATTR_NONSECURE, perm, SPU_LOCK_CONF_LOCKED);
240+
#endif /* REGION_RPMSG_NRF53_SRAM_ADDRESS */
241+
231242
return TFM_PLAT_ERR_SUCCESS;
232243
}
233244

0 commit comments

Comments
 (0)