14 Implementation Defined Attribution Unit (IDAU)
- The Secure Attribution Unit (SAU): not present on PIC32CM LS00/LS60.
- The Implementation Defined Attribution Unit (IDAU): chosen for PIC32CM LS00/LS60.
The SAU is a Memory Protection Unit (MPU) like hardware embedded in the core. The role of the SAU is to manage all the Secure and Non-Secure transactions coming from the core and the debugger. However, using the SAU implies that the security configuration must be propagated somewhere else in the MCU architecture for security awareness.
The IDAU is a hardware unit external to the core, which is used to indicate to the processor if a particular memory region is Secure (S), Non-Secure Callable (NSC), or Non-Secure (NS). It can also mark a memory region to be exempted from security checking. The Cortex-M23 checks each access (fetch or data) in the IDAU, which returns the privilege information about that specific address. If the access is not permitted, the CPU enters a HardFault exception.
Attribute | Description |
---|---|
Non-Secure | Memory can be accessed in Secure or Non-Secure state. |
Secure | Memory can only be accessed in Secure state. It cannot be called from Non-Secure state. |
Non-Secure callable |
Memory can only be accessed in Secure state, but can be called from Non-Secure state. |
Exempt | No attribution check will be done, and the operation will take place on the bus |
The following table provides the PIC32CM LS00/LS60 memory space security attributions:
Memory region | Attribute |
---|---|
Secure Flash (BOOT region) | Secure |
Non-Secure Callable Flash (BOOT region) | Non-secure callable |
Secure Flash (APPLICATION region) | Secure |
Non-Secure Callable Flash (APPLICATION region) | Non-secure callable |
Non-Secure Flash (APPLICATION region) | Non-secure |
Secure Data Flash | Secure |
Non-Secure Data Flash | Non-secure |
NVM Rows |
Exempt - eXecute Never Secure (R/W access) Non-Secure (Discarded for BOCOR, Read-only for the others) |
Boot ROM | Secure Execute-only for CRYA functions |
Secure SRAM | Secure |
Non-Secure SRAM | Non-secure |
Peripherals | Exempt - eXecute Never |
IOBUS | Exempt - eXecute Never |
Others (Reserved, Undefined...) | Secure |
- Exempt property relates only to the IDAU: Peripherals, IOBUS as well as NVM rows security is directly done at the peripheral level.
Memory region | Attribute |
---|---|
Boot ROM | Secure Execute-only for CRYA functions |
Others | Exempt |
- The memory controllers: Flash, Data Flash and SRAM embedded memories can be split in sub-regions, which are reserved either for the Secure or for the Non-Secure application.
- The peripheral controllers using the Peripherals Access Controller (PAC) which can allocate each peripheral either to the Secure or to the Non-Secure application, with the exception of the IDAU and DSU which have a fixed security attribute:
- The IDAU peripheral is always Secured.
- The DSU peripheral is always Non-Secured.
- The PAC and NVMCTRL peripherals are always Secured if BOCOR.SECCFGLOCK = 1 after exiting Boot ROM.
Software can check the privilege state of a memory location by using the Cortex-M23 Test Target instructions: TT, TTT, TTA, and TTAT.
The memory location is referenced using the Cortex-M23 IREGION bit field, which specifies the IDAU region number (Refer to the ARMv8-M Architecture Reference Manual for more information).
Memory Region | IDAU Region Number for TTx Instructions (IREGION bits) |
---|---|
Secure Flash (BOOT region) | 0x01 |
Non-Secure Callable Flash (BOOT region) | 0x02 |
Secure Flash (APPLICATION region) | 0x03 |
Non-Secure Callable Flash (APPLICATION region) | 0x04 |
Non-Secure Flash (APPLICATION region) | 0x05 |
Secure Data Flash | 0x06 |
Non-Secure Data Flash | 0x07 |
NVM User Rows | 0x00 (invalid) |
Boot ROM | 0x08 |
Secure SRAM | 0x09 |
Non-Secure SRAM | 0x0A |
Peripherals | 0x00 (invalid) |
IOBUS | 0x00 (invalid) |
Others (Reserved, Undefined...) | 0x00 (invalid) |
Memory Region | IDAU Region Number for TTx Instructions (IREGION bits) |
---|---|
Boot ROM | 0x08 |
Others | 0x00 (invalid) |