drivers: ieee802154: Deny use of nRF FICR registers in NS domain
This commit introduces the catch that prevents building of IEEE 802.15.4 nRF driver in case the non-secure domain of the core is used. Signed-off-by: Czeslaw Makarski <Czeslaw.Makarski@nordicsemi.no>
This commit is contained in:
parent
15fdd7175b
commit
63fe072a1d
1 changed files with 5 additions and 0 deletions
|
@ -86,9 +86,14 @@ static void nrf5_get_eui64(uint8_t *mac)
|
||||||
mac[index++] = (IEEE802154_NRF5_VENDOR_OUI >> 8) & 0xff;
|
mac[index++] = (IEEE802154_NRF5_VENDOR_OUI >> 8) & 0xff;
|
||||||
mac[index++] = IEEE802154_NRF5_VENDOR_OUI & 0xff;
|
mac[index++] = IEEE802154_NRF5_VENDOR_OUI & 0xff;
|
||||||
|
|
||||||
|
#if defined(CONFIG_SOC_NRF5340_CPUAPP) && \
|
||||||
|
defined(CONFIG_TRUSTED_EXECUTION_NONSECURE)
|
||||||
|
#error Accessing EUI64 on the non-secure mode is not supported at the moment
|
||||||
|
#else
|
||||||
/* Use device identifier assigned during the production. */
|
/* Use device identifier assigned during the production. */
|
||||||
factoryAddress = (uint64_t)EUI64_ADDR[0] << 32;
|
factoryAddress = (uint64_t)EUI64_ADDR[0] << 32;
|
||||||
factoryAddress |= EUI64_ADDR[1];
|
factoryAddress |= EUI64_ADDR[1];
|
||||||
|
#endif
|
||||||
memcpy(mac + index, &factoryAddress, sizeof(factoryAddress) - index);
|
memcpy(mac + index, &factoryAddress, sizeof(factoryAddress) - index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue