14.8 IDAU Regions Configuration

The module is disabled at reset (APB). This is reflected by STATUSA.ENABLE. All IDAU regions except those marked as “valid when disabled” by the IDAU_MAIN_REGIONS_MAP parameter are considered exempt from security when the module is disabled. Only IDAU regions belonging to a main region of MR_SEC or MR_NON- SEC type can be valid when the module is disabled, which is typically the case for the main region corresponding to the Boot ROM. All IDAU region watermark settings are zeroed internally and exported as such to the system when STATUSA.ENABLE = 0 (associated regions cannot be reached). All IDAU region block settings are forced to 1’s internally and exported as such to the system when STATUSA.ENABLE = 0 (forced to non-secure state). This allows to write the secure configuration and to apply it to the system at once by enabling the module and therefore to prevent intermediate states to appear at system level while writing the configuration registers. The device Boot ROM and/or secure boot are in charge of configuring the module. All IDAU regions settings MUST be initialized prior to enabling the module, refer to the Command and Arguments table to identify configurable regions. The state of the configuration registers is unknown at reset.

Each IDAU region has its own register group composed of RCTRL, RSTATUSA, RSTATUSB and RSTATUSC registers. The number of implemented register groups is readable from STATUSA.NBRG and cannot exceed 256.

Region register groups are mapped at offset 0x1000:

  • RCTRL[w] is mapped at offset 0x1000+w*0x10
  • RSTATUSA[w] is mapped at offset 0x1000+w*0x10+0x4
  • RSTATUSB[w] is mapped at offset 0x1000+w*0x10+0x8
  • RSTATUSC[w] is mapped at offset 0x1000+w*0x10+0xC

To configure an IDAU region, first read its RSTATUSA register to determine its type. The type will determine which commands are legal and legal argument values.

Table 14-4. RSTATUS[A,B]
IDAU Region Type: RSTATUSA.TYPE RSTATUSA.GRAN RSTATUSA.MAXSZ RSTATUSB.[SIZE,NONSEC]
INVALID N/A(reads 0) N/A(reads 0) N/A(reads 0)
SEC N/A(reads 0) N/A(reads 0) N/A(reads 0)
NONSEC N/A(reads 0) N/A(reads 0) N/A(reads 0)
NONSEC_W

CFG

Size in Bytes of one RCTRL[w].ARGLSb

CFG

MAXSZ-1is the maximum value of RCTRL[w].ARG

IDAU region size in Bytes
SECnNONSEC_L N/A(reads 0) N/A(reads 0)

Defines the state of the region/block: non-secure when NONSEC[0] = 1,

secure otherwise. This is a mirror of the linked IDAU region RSTATUSB block NONSEC bit.

NSC_W

CFG

Size in Bytes of one RCTRL[w].ARGLSb

CFG

MAXSZ-1is the maximum value of RCTRL[w].ARG

IDAU region size in Bytes
EXEMPT_B

CFG

Size in Bytes of a block

CFG

Maximum number of blocks inside the region

Defines the state of the region blocks:

For each valid NONSEC[y], y<MAXSZ

block y is non-secure when NONSEC[y] = 1, secure otherwise

Note:
  1. Bolded cells denote static configuration (combo logic) whereas white cells denote a configuration that can be modified using RCTRL commands.
  2. _W suffix indicates that the IDAU region has a watermark configuration.
  3. _B suffix indicates that the IDAU region is divided into blocks that can be configured as secure or Non-secure.
  4. _L suffix indicates that the configuration of the IDAU region is linked to another one.
  5. CFG: Chip specific information extracted from the IDAU_MAIN_REGIONS_MAP parameter.
Table 14-5. Command and Arguments
RSTATUSA.TYPE Valid RCTRL.CMD commands RCTR.ARG

Valid when

INVALID None N/A
SEC None N/A
NONSEC None N/A
NONSEC_W WRSZ < RSTATUSA.MAXSZ
SECnNONSEC_B [CLR,SET]NONSEC 0
SECnNONSEC_L None N/A
NSC_W WRSZ < RSTATUSA.MAXSZ (1)
EXEMPT_B [CLR,SET]NONSEC < RSTATUSA.MAXSZ

For each IDAU region, the command and argument validity are checked by the macro. When a command or argument is not valid:

  • The command is discarded
  • An error is reported to STATUSB.CFGERR

Before writing CTRL.ENABLE = 1:

  • All configurable settings must be written (see the non-bolded cells in the RSTATUS[A,B] table)
  • STATUSB.CFGERR must be read 0

The CTRL.CMD ENABLE command is discarded when STATUSB.CFGERR is high.

Once STATUSA.ENABLE is set, configuration is applied at the system level.

Note:
  1. The NSC_W size can exceed the remaining space size left by the NONSEC IDAU region in the MAIN region. In this case, no CFGERR error is reported and the NSC_W region overlaps exactly the whole SEC IDAU region, the NSC_W region cannot overlap MAIN regions it does not belong to.