8. Illegal access controller (IAC)

8.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.

8.2 IAC main features

8.3 IAC implementation

The index of the peripherals managed by the IAC in this device is defined in Table 28. Indexes 0 to 127 are also used in the RIFSC to configure the proper access control using RISUP blocks.

Table 28. Peripheral indexes in IAC

Peripherals 31 to 0
31302928272625242322212019181716
TIM5TIM4TIM3TIM2TIM1FDCAN1/2/3LPUART1USART10UART9UART8UART7USART6UART5UART4USART3USART2
1514131211109876543210
I3C2I3C1I2C4I2C3I2C2I2C1SAI2-SAI1SPI6/I2S6SPI5SPI4SPI3/I2S3SPI2/I2S2SPI1/I2S1
Peripherals 63 to 32
63626160595857565554535251504948
-SYSCONFSPDIFRXGB-ETH-UCPDOTG1_FSOTG1_HSMDIOSSDMMC2SDMMC1MDF1ADF1LPTIM5LPTIM4LPTIM3
47464544434241403938373635343332
LPTIM2LPTIM1GFXTIMTIM18TIM17TIM16TIM15TIM14TIM13TIM12TIM11TIM10TIM9TIM8TIM7TIM6
Peripherals 95 to 64
95949392919089888786858483828180
-DCMIDCMIIPPCSI2HOST-FMCXSPIMXSPI3XSPI2XSPI1-MCE4MCE3MCE2MCE1CRYP1
79787776757473727170696867666564
HASHSAESPKARNG------WWDGIWDGCRC-VREFBUFADC12
ST logo
ST logo

Table 28. Peripheral indexes in IAC (continued)

Peripherals 127 to 96
127-
126-
125-
124-
123-
122-
121-
120-
119-
118-
117-
116-
115-
114-
113-
112-
111-
110-
109-
108-
107-
106NPU - Neural ART
105-
104LTDC_L2
103LTDC_L1
102LTDC_CMN
101DMA2D
100GFXMMU
99GPU
98ICACHE
97VENC
96JPEG
Peripherals 159 to 128
159-
158RIFSC
157RISAF23 (BKPSRAM)
156RISAF22 (AHB RAM2)
155RISAF21 (AHB RAM1)
154-
153RISAF15 (Cache config)
152RISAF14 (FMC)
151RISAF13 (XSPI3)
150RISAF12 (XSPI2)
149RISAF11 (XSPI1)
148-
147RISAF9 (VENCRA)
146RISAF8 (CACHEAXI)
145RISAF7 (FLEXRAM)
144RISAF6 (CPU_MST)
143RISAF5 (NPU_MST1)
142RISAF4 (NPU_MST0)
141RISAF3 (AXISRAM2)
140RISAF2 (AXISRAM1)
139RISAF1 (TCM)
138IAC
137PWR_CTRL
136RCC
135BSEC
134TAMP
133RTC
132-
131HPDMA1
130GPDMA1
129EXTI
128CM55

8.4 IAC functional description

8.4.1 IAC block diagram

Figure 9 shows the IAC block diagram, in context.

Figure 9. IAC block diagram

Block diagram of the Illegal Access Controller (IAC) showing its internal components and external interfaces.

The diagram illustrates the Illegal Access Controller (IAC) and its interaction with other system components. The IAC is a central block containing several sub-components: 'ILAC events' (receiving inputs from 'RIF-protected peripheral #1', '...', 'RIF-protected peripheral #n', and 'RIFcomponent (memory gate)'), 'Masking and routing', 'IER' (Interrupt Enable Register), 'ISR/CR' (Interrupt Status/Control Register), and 'IAC' itself. The 'IER' and 'ISR/CR' are connected to an 'AHB bus' via a 'snq' (store and queue) mechanism. The 'IAC' block outputs an 'iac_it' (Illegal Access Interrupt) signal to an 'Interrupt control' block, which is part of a 'Trusted CPU' (indicated by a dashed box). The 'Interrupt control' block then sends a 'sec_irq' (secure interrupt) to the 'CPU'. The 'IAC' also receives an 'iac_hclk-' clock signal.

Block diagram of the Illegal Access Controller (IAC) showing its internal components and external interfaces.

MSv67853V2

8.4.2 IAC internal signals

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

Table 29. IAC internal signals

NameTypeDescription
iac_hclkDigital inputAHB bus clock
iac_itDigital outputGlobal interrupt request

8.4.3 IAC reset and clocks

The IAC peripheral has a dedicated clock and reset control in the RCC.

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

8.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 CPU, if needed. By default, all events in the IAC are masked.

The IAC has room for 160 interrupt sources. Each source corresponds to an IAC index from 0 to 159. 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 8.3.

8.4.5 IAC management by trusted application

For each interrupt source of index ⟨i⟩, an illegal access sets the IAFi flag in IAC_ISR⟨i⟩. A secure privileged application can clear this flag using the corresponding bit in IAC_ICR⟨i⟩. An IAC interrupt is triggered when IAFi is set while IAEi is set in IAC_IER⟨i⟩.

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 protecting a memory (RISAF), a secure privileged 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.

8.5 IAC interrupts

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

Note: Only secure privileged application 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 8.3 is set.

Table 30. IAC interrupt request

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

8.6 IAC registers

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

8.6.1 IAC interrupt enable register x (IAC_IERx)

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

Reset value: 0x0000 0000

Secure privileged, 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 does not generate interrupt (masked).

1: Illegal access event from peripheral can generate interrupts (unmasked).

8.6.2 IAC interrupt status register x (IAC_ISRx)

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

Reset value: 0x0000 0000

Secure privileged, 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 8.3 for details). This bit is cleared when the corresponding IAF bit is set in IAC_ICRx.
0: No illegal access event detected for the peripheral (since reset or the last time this bit was cleared).
1: At least one illegal access event has been detected for the peripheral (since the last time this bit was cleared).

8.6.3 IAC interrupt clear register x (IAC_ICRx)

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

Reset value: 0x0000 0000

Secure, privileged 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

8.6.4 IAC ILAC input status register x (IAC_IISRx)

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

Reset value: 0xFFFF FF7F, 0x77FF FFFF, 0x77DF F03B, 0x0000 05FF, 0x7BEF FFEF, 0x0000 0000

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

8.6.5 IAC register map

Table 31. 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 FF7F, 0x77FF FFFF, 0x77DF F03B, 0x0000 05FF, 0x7BEF FFEF, 0x0000 0000

Refer to Section 2.3: Memory organization for the register boundary addresses.