12. Illegal access controller (IAC)

12.1 IAC introduction

The RIF (resource isolation framework) is a comprehensive set of hardware blocks designed to enforce and manage the isolation of STM32 hardware resources, such as memory and peripherals.

The RIF uses the IAC (illegal access controller) to centralize the detection of RIF-related illegal accesses, managed by a secure application running in the trusted domain.

12.2 IAC main features

12.3 IAC implementation

The index table (from 0 to 127) of the non-RIF-aware peripherals managed by the IAC is centralized in Section 9: Resource isolation framework security controller (RIFSC).

The index table (from 128 and above) for the RIF components and RIF-aware peripherals also managed by the IAC is found as well in Section 9: Resource isolation framework security controller (RIFSC).

12.4 IAC functional description

12.4.1 IAC block diagram

Figure 36 shows the IAC block diagram, in context.

Figure 36. IAC block diagram

Block diagram of the Illegal Access Controller (IAC) showing its internal components and connections to peripherals and the CPU.

The diagram illustrates the Illegal Access Controller (IAC) architecture. On the left, three input sources are shown: 'RIF-protected peripheral #1', an ellipsis '...', 'RIF-protected peripheral #n', and 'RIFcomponent (memory gate)'. Arrows from these sources point to a central block labeled 'IAC'. Inside the 'IAC' block, there are three sub-blocks: 'ILAC events', 'Masking and routing', and 'ISR/CR'. The 'ILAC events' block receives inputs from the peripherals. The 'Masking and routing' block is connected to both 'ILAC events' and 'ISR/CR'. The 'ISR/CR' block is connected to the 'AHB bus' via a bidirectional arrow. The 'AHB bus' is also connected to an 'iac_hclk-' signal. The 'IAC' block outputs an 'iac_it' signal to an 'Interrupt control' block. The 'Interrupt control' block is part of a dashed-line box labeled 'Trusted CPU'. This box also contains a 'CPU' block. The 'Interrupt control' block sends a 'sec_irq' signal to the 'CPU'.

MSv67853V2

Block diagram of the Illegal Access Controller (IAC) showing its internal components and connections to peripherals and the CPU.

12.4.2 IAC internal signals

Table 53 lists the internal signals available at IAC level, not at product level.

Table 53. IAC internal signals

NameTypeDescription
iac_hclkDigital inputAHB bus clock
iac_itDigital outputGlobal interrupt request

12.4.3 IAC reset and clocks

The IAC peripheral clock is automatically managed by the device, and the peripheral is reset only by a system reset.

The IAC requires its clock in order to trigger an interrupt request event.

12.4.4 IAC use in RIF

The IAC gathers illegal events generated within the system when an illegal access is detected. The IAC can then generate a secure interrupt towards the secure trusted CPU, if needed. By default, all events in the IAC are masked.

The IAC has room for 256 interrupt sources. Each source corresponds to an IAC index from 0 to 255. The interrupt sources from non-RIF-aware peripherals occupy most of the first 128 indexes. The interrupt sources from RIF-aware peripherals and RIF firewalls occupy indexes from 128 onwards. All these sources are defined in Section 12.3.

Refer to Section 6.2: Resource isolation framework (RIF) for more information on illegal access definitions.

12.4.5 IAC management by trusted application

For each interrupt source of index <i>, an illegal access sets the IAFi flag in IAC_ISRx. A secure privileged trusted application can clear this flag using the corresponding bit in IAC_ICRx. An IAC interrupt is triggered when IAFi is set while IAIEi is set in IAC_IERx.

Indexes between 0 to 127 are assigned to non-RIF-aware peripherals, with a RISUP block instantiated in front of its configuration port to filter configuration accesses. The programming of these RISUP blocks (in the RIFSC) uses the same index as the IAC.

Indexes 128 and above are assigned to RIF components and RIF-aware peripherals. These peripherals can block illegal accesses to their configuration registers (without RISUP).

For RIF-aware peripherals that protect a memory, a secure privileged trusted application can obtain, in the peripheral, more details about the cause of the illegal access event:

The IAC interrupt handler must clear IAFi in IAC_ISR before clearing the error flag(s) in the firewall peripheral xx (using xx_IACR register). Otherwise, an illegal access can occur between clearing the flags in the firewall and clearing the flag in the IAC, and the application is unaware of this error.

12.5 IAC interrupts

The RIF interrupt management in the IAC is summarized in Table 54.

Note: Only secure privileged trusted domain application, or debugger executing in the secure privileged debug domain can enable, read, and clear illegal access interrupts.
If there is an illegal access to the IAC itself, the status flag corresponding to the IAC index in Section 9: Resource isolation framework security controller (RIFSC) is set.

Table 54. IAC interrupt request

AcronymInterrupt eventEvent flag in IAC_ISREnable control bit in IAC_IERInterrupt clear method
IACIllegal access errorIAFIAIESet IAF bit in IAC_ICR

12.6 IAC registers

All IAC registers are accessed only by words (32 bits).

If the debug domain feature is activated and security and privileged policy allows it, the debug domain traffic goes through, regardless of any CID filtering policy. If the debug domain feature is de-activated the CID filtering policy also applies to debug domain traffic.

12.6.1 IAC interrupt enable register x (IAC_IERx)

Address offset: 0x000+0x4*x (x = 0 to 5)

Reset value: 0x0000 0000

Secure privileged, trusted domain CID, read and write only.

31302928272625242322212019181716
IAIE{i + 32 * x}
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
IAIE{i + 32 * x}
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 IAIE{i + 32 * x}: Illegal access interrupt enable for peripheral {i + 32 * x} (i = 0 to 31)

Each bit is set to unmask illegal access events from peripheral {i + 32 * x}.

0: Illegal access event from peripheral {i + 32 * x} does not generate interrupt (masked).

1: Illegal access event from peripheral {i + 32 * x} can generate interrupts (unmasked).

12.6.2 IAC interrupt status register x (IAC_ISRx)

Address offset: 0x080 + 0x4 * x (x = 0 to 5)

Reset value: 0x0000 0000

Secure privileged, trusted domain CID, read only.

31302928272625242322212019181716
IAF{i + 32 * x}
rrrrrrrrrrrrrrrr
1514131211109876543210
IAF{i + 32 * x}
rrrrrrrrrrrrrrrr

Bits 31:0 IAF{i + 32 * x}: Illegal access interrupt enable for peripheral {i + 32 * x} (i = 0 to 31)

Each bit is set when an illegal access event occurs in the peripheral {i + 32 * x} (see Section 12.3 for details). This bit is cleared when the corresponding IAF bit is set in IAC_ICRx.

0: No illegal access event detected for peripheral {i + 32 * x} (since reset or the last time this bit was cleared).

1: At least one illegal access event has been detected for peripheral {i + 32 * x} (since the last time this bit was cleared).

12.6.3 IAC interrupt clear register x (IAC_ICRx)

Address offset: 0x100 + 0x4 * x (x = 0 to 5)

Reset value: 0x0000 0000

Secure privileged, trusted domain CID, write only.

31302928272625242322212019181716
IAF{i + 32 * x}
wwwwwwwwwwwwwwww
1514131211109876543210
IAF{i + 32 * x}
wwwwwwwwwwwwwwww

Bits 31:0 IAF{i + 32 * x}: Illegal access flag clear for peripheral {i + 32 * x} (i = 0 to 31)

Setting each bit clears the status flag of the illegal access event {i + 32 * x} in IAC_ISRx.

0: IAF {i + 32 * x} flag status not affected

1: IAF {i + 32 * x} flag status cleared in IAC_ISRx

12.6.4 IAC ILAC input status register x (IAC_IISRx)

Address offset: 0x36C + 0x4 * x (x = 0 to 5)

Reset value: 0xFFFF FFFF, 0xBFDF FFFF, 0xF7D3 FFFC, 0xEFFD FDFF, 0xFFFF 3EFF, 0x0003 CFFF

31302928272625242322212019181716
ILACIN{i + 32 * x}
rrrrrrrrrrrrrrrr
1514131211109876543210
ILACIN{i + 32 * x}
rrrrrrrrrrrrrrrr

Bits 31:0 ILACIN{i + 32 * x}: Illegal access input {i + 32 * x} (i = 0 to 31)

0: ILAC input {i + 32 * x} to IAC not present

1: ILAC input {i + 32 * x} to IAC present

12.6.5 IAC hardware configuration register 2 (IAC_HWCFGR2)

Address offset: 0x3EC

Reset value: 0x0000 0002

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.CFG2[3:0]CFG1[3:0]
rrrrrrrr

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:4 CFG2[3:0]: Hardware configuration 2

This bitfield returns the generic value DEFAULT_IER.

Bits 3:0 CFG1[3:0]: Hardware configuration 1

This bitfield returns the generic value NUM_RESYNC_FLOPS.

12.6.6 IAC hardware configuration register 1 (IAC_HWCFGR1)

Address offset: 0x3F0

Reset value: 0x00B4 3111

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.CFG5[8:0]
rrrrrrrrr
1514131211109876543210
CFG4[3:0]CFG3[3:0]CFG2[3:0]CFG1[3:0]
rrrrrrrrrrrrrrrr

Bits 31:25 Reserved, must be kept at reset value.

Bits 24:16 CFG5[8:0]: Hardware configuration 5
This bitfield returns the generic value NUM_ILAC.

Bits 15:12 CFG4[3:0]: Hardware configuration 4
This bitfield returns the generic value CID_WIDTH.

Bits 11:8 CFG3[3:0]: Hardware configuration 3
This bitfield returns the generic value PRIV_ENABLED.

Bits 7:4 CFG2[3:0]: Hardware configuration 2
This bitfield returns the generic value SEC_ENABLED.

Bits 3:0 CFG1[3:0]: Hardware configuration 1
This bitfield returns the generic value RIF_ENABLED.

12.6.7 IAC version register (IAC_VERR)

Address offset: 0x3F4

Reset value: 0x0000 0010

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.MAJREV[3:0]MINREV[3:0]
rrrrrrrr

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:4 MAJREV[3:0]: IAC major revision

Bits 3:0 MINREV[3:0]: IAC minor revision

12.6.8 IAC identification register (IAC_IPIDR)

Address offset: 0x3F8

Reset value: 0x0010 0163

31302928272625242322212019181716
ID[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
ID[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 ID[31:0]: IAC identification code

12.6.9 IAC size identification register (IAC_SIDR)

Address offset: 0x3FC

Reset value: 0xA3C5 DD01

31302928272625242322212019181716
SID[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
SID[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 SID[31:0]: IAC size identification code

Bits[31:8] = 0xA3C5DD (fixed code)

Bits[7:0] = 0x01 (1-Kbyte address decoding)

12.6.10 IAC register map

Table 55. IAC register map and reset values

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x000 + 0x4*x
(x = 0 to 5)
Last address:
0x014
IAC_IERxIAIE{i + 32 * x}
Reset value00000000000000000000000000000000
0x018-0x07CReservedReserved
0x080 + 0x4*x
(x = 0 to 5)
Last address:
0x094
IAC_ISRxIAF{i + 32 * x}
Reset value00000000000000000000000000000000
0x098-0x0FCReservedReserved
0x100 + 0x4*x
(x = 0 to 5)
Last address:
0x114
IAC_ICRxIAF{i + 32 * x}
Reset value00000000000000000000000000000000
0x118-0x368ReservedReserved
0x36C + 0x4*x
(x = 0 to 5)
Last address:
0x384
IAC_IISRxILACIN{i + 32 * x}
Reset value0xFFFF FFFF, 0xBFDF FFFF, 0xF7D3 FFFC, 0xEFFD FDFF, 0xFFFF 3EFF, 0x0003 CFFF
0x388-0x3E8ReservedReserved
0x3ECIAC_HWCF GR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value0000
0x3F0IAC_HWCF GR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value
0x3F4IAC_VERRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value
0x3F8IAC_IPIDRID[31:0]
Reset value000000000001000000000000101100011
0x3FCIAC_SIDRSID[31:0]
Reset value101000111100010111011101000000001

Refer to Section 2.4 for the register boundary addresses.