Skip to content

Commit

Permalink
[nrf fromtree] platform: nordic: Guard nvmc header with soc
Browse files Browse the repository at this point in the history
The anomaly only appears on nRF91 platforms and some
platforms do not have NVMC so the header cannot be
included.

Change-Id: I02c73c9a752599ca9be9320dc19f390aea0f767a
Signed-off-by: Seppo Takalo <[email protected]>
(cherry picked from commit 539dd89)
  • Loading branch information
SeppoTakalo authored and nordicjm committed Aug 22, 2024
1 parent e14fd51 commit ac50042
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
#include <tfm_platform_user_memory_ranges.h>

#include <hal/nrf_gpio.h>
#ifdef NRF91_SERIES
#include <nrfx_nvmc.h>
#endif

#include "handle_attr.h"

Expand Down Expand Up @@ -61,7 +63,7 @@ tfm_platform_hal_read_service(const psa_invec *in_vec,

if (args->addr >= start &&
args->addr + args->len <= start + size) {
#ifdef NRF_UICR_S_BASE
#ifdef NRF91_SERIES
if (start >= NRF_UICR_S_BASE &&
start < (NRF_UICR_S_BASE + sizeof(NRF_UICR_Type))) {
/* Range is inside UICR. Some nRF platforms need special handling */
Expand Down

0 comments on commit ac50042

Please sign in to comment.