Non-secure callable (NSC) region definition in RAM

nRF5340 Product Specification

SPU provides support for the definition of non-secure callable (NSC) sub-regions to allow non-secure to secure function calls.

A non-secure callable sub-region can only exist within an existing secure region. It is defined by the following registers:

  • RAMNSC[n].REGION, used to select the secure region that will contain the NSC sub-region
  • RAMNSC[n].SIZE, used to define the size of the NSC sub-region within the secure region

The NSC sub-region will be defined starting with the highest address in that region and descending. The following figure shows the NSC sub-regions and the registers used for their definition.

Figure 5. Non-secure callable region definition in the RAM memory space
Page-1 Sheet.6 Sheet.7 Sheet.8 RAMREGION[0].PERM RAMREGION[0].PERM Sheet.9 RAMNSC[0].REGION == n RAMNSC[0].REGION == n Sheet.10 Sheet.11 Access control Access control Sheet.13 Sheet.14 RAMREGION[n].PERM RAMREGION[n].PERM Sheet.15 Sheet.16 SPU registers SPU registers Sheet.17 Region #n (secure) Region #n (secure) Dynamic connector Sheet.20 NSC subregion 0 NSC subregion 0 Sheet.21 Sheet.22 RAMNSC[0].SIZE == m m !=0 RAMNSC[0].SIZE == m m !=0 Sheet.23 Region size Region size Sheet.24 Sheet.25 Sheet.26 RAM address space RAM address space Sheet.27 Sheet.28 Sheet.29 Region #n-1 Region #n-1 Sheet.30 Region #n+1 Region #n+1 Dynamic connector.132 Sheet.32 2(m+4) bytes 2(m+4) bytes Sheet.33

The NSC sub-region will only be defined when the following are true:

  • RAMNSC[i].SIZE value is non zero
  • RAMNSC[i].REGION defines a secure region

If RAMNSC[i].REGION and RAMNSC[j].REGION have the same value, there is only one sub-region defined as NSC, with the size given by the maximum of RAMNSC[i].SIZE and RAMNSC[j].SIZE.

If RAMNSC[i].REGION defines a non-secure region, then there is no non-secure callable region defined and the selected region stays non-secure.