From cfbd116b5dd671a9fdcbb6e51380c516734f4f4e Mon Sep 17 00:00:00 2001 From: Dominik Kilian Date: Wed, 2 Oct 2024 08:57:31 +0200 Subject: [PATCH] [nrf fromlist] modules: hal_nordic: Allow app mem from net core in serialized 802.15.4 Currently, the serialization module for 802.15.4 enabled the network core without giving it access to application core memory in trusted execution mode. This commit grands this access. Upstream PR: https://github.com/zephyrproject-rtos/zephyr/pull/79316 Signed-off-by: Dominik Kilian --- .../platform/nrf_802154_spinel_backend_ipc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/hal_nordic/nrf_802154/serialization/platform/nrf_802154_spinel_backend_ipc.c b/modules/hal_nordic/nrf_802154/serialization/platform/nrf_802154_spinel_backend_ipc.c index 6df811f6bad..9071b57c516 100644 --- a/modules/hal_nordic/nrf_802154/serialization/platform/nrf_802154_spinel_backend_ipc.c +++ b/modules/hal_nordic/nrf_802154/serialization/platform/nrf_802154_spinel_backend_ipc.c @@ -9,6 +9,11 @@ #include #include +#if defined(CONFIG_SOC_NRF5340_CPUAPP) +#include +#include +#endif + #include "nrf_802154.h" #include "nrf_802154_spinel_backend_callouts.h" #include "nrf_802154_serialization_error.h" @@ -55,6 +60,14 @@ nrf_802154_ser_err_t nrf_802154_backend_init(void) int err; #if defined(CONFIG_SOC_NRF5340_CPUAPP) + +#if !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) + /* Retain nRF5340 Network MCU in Secure domain (bus + * accesses by Network MCU will have Secure attribute set). + */ + nrf_spu_extdomain_set((NRF_SPU_Type *)DT_REG_ADDR(DT_NODELABEL(spu)), 0, true, false); +#endif /* !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) */ + nrf53_cpunet_enable(true); #endif