Options for ARM SMMUs
On ARM boards, IOMMUs are known as SMMUs; a smmuman service running on the hardware needs a support library for the board SMMUs.
Version | Non-safety systems | Safety-related systems |
---|---|---|
ARM SMMUv2 | smmu-armsmmu.so | smmu-armsmmu-safety.so |
ARM SMMUv3 | smmu-armsmmuv3.so | smmu-armsmmuv3-safety.so |
Options for Renesas R-Car IPMMUs.
Options for ARM SMMUv2
The following list describes the ARM SMMUv2 options for a smmuman service using a smmu-armsmmu.so or smmu-armsmmu-safety.so support library. These support libraries implement the code to communicate with ARM SMMUs, as specified in Chapter 16 of System Memory Management Unit Architecture Specification: SMMU architecture version 2.0 (2016) ARM IHI 0062D.c (ID070116), ARM Ltd, 2012-16. See https://developer.arm.com/documentation/ihi0062/dc.
- smmu_type_param
- On boards that use the ARM SMMU architecture, the smmu_type_param argument requires no further arguments. For example:
wheresmmu armsmmu
smmu-armsmmu[-safety].so
is the name of the architecture-specific support library. - smmu_unit_param
- On boards that use the ARM SMMU architecture, the syntax for smmu_unit_param is as follows:
paddr,NScIrpt,NSgIrpt,bypass[,res_sid[,cfg_dll]]
- paddr
- The physical address of the main memory SMMU registers.
- NScIrpt
- The interrupt number to use for context faults.
- NSgIrpt
- The interrupt number to use for global faults.
- bypass
- Bypass unidentified streams. Set to 1 (one) to
bypass unidentified streams; set to 0 (zero) to
not bypass unidentified streams (see
Board-specific configuration libraries
below). - res_sid
- Optional. A list of StreamIDs reserved for the system.
List entries must be separated by a colon (e.g.,
4:5
). - cfg_dll
- Optional. The base name for the board-specific configuration DLL
(see
Board-specific configuration libraries
below).
For example, the following shows how the smmu_unit_param argument might be used for an i.MX8 board:
whereunit mmu500 0x51400000,64,66,1,4:5:16,imx8
mmu500
is the name assigned to the SMMU unit in the configuration (seeGlobal options
),0x514000000
is the physical address of the SMMU unit registers, 64 is the number of the interrupt to assert when a context fault occurs, 66 is the number of the interrupt to assert when a global fault occurs, 1 instructs smmuman to bypass unidentified streams,4:5:16
specifies that StreamIDs 4, 5 and 16 are reserved for the system, andimx8
instructs smmuman to load the smmu-cfg-imx8.so library. - smmu_use_param
- On boards with ARM SMMU architectures, the syntax for smmu_use_param is as follows:
smmu_use_param sid
- sid
- The ID of the stream (StreamID in ARM nomenclature) the device uses to perform the transaction.
For example, the following shows how the smmu_use_param argument might be used for an i.MX8 board, with the StreamID set in the configuration:
wheredevice mem:0x5b040000 use mmu500 9
mmu500
is the name assigned to the SMMU unit in the configuration, and 9 is the StreamID.
StreamID set at run time
## StreamID is 0 is reserved for bypass.
smmu smmu-armsmmu.so
unit mmu500 0x51400000,64,66,1,0,imx8
...
device mem:0x2c000000 use mmu500 *
where smmu smmu-armsmmu.so
identifies the architecture-specific
support library, and
unit mmu500 0x51400000,64,66,1,0,imx8
configures the SMMU unit, specifying that StreamID 0 is reserved, and device
mem:0x2c000000 use mmu500 *
specifies that the StreamID
for this device should be set at run time.Options for ARM SMMUv3
The following list describes the ARM SMMUv3 options for a smmuman service using a smmu-armsmmuv3.so or smmu-armsmmuv3-safety.so support library. These support libraries implement the code to communicate with ARM SMMUs, as specified in Chapter 16 of System Memory Management Unit Architecture Specification: SMMU architecture version 3 (2016-2020) ARM IHI 0070, ARM Ltd, 2016-2020. See https://developer.arm.com/documentation/ihi0070/ca/.
- smmu_type_param
- On boards that use the ARM SMMU architecture, the smmu_type_param argument requires no further arguments. For example:
wheresmmu armsmmuv3
smmu-armsmmuv3[-safety].so
is the name of the architecture-specific support library. - smmu_unit_param
- On boards that use the ARM SMMU architecture, the syntax for smmu_unit_param is as follows:
paddr[,gerror_irq[:eventq_irq][:cmdq_irq][:priq_irq][,min_sid-max_sid[,cfg_dll]]]
- paddr
- The physical address of the main memory SMMU registers.
- gerror_irq
- Optional. The interrupt number to use for GERROR.
- eventq_irq
- Optional. The interrupt number to use for the Event queue.
- cmdq_irq
- Optional. The interrupt number to use for the Command queue.
- priq_irq
- Optional. The interrupt number to use for the PRI queue.
- min_sid
- Optional. The minimum stream ID. You can use an asterisk (*) to use the default (0).
- max_sid
- Optional. The maximum stream ID. You can use an asterisk (*) to use default (0xFFFFFFFF).
- cfg_dll
- Optional. The base name for the board-specific configuration DLL
(see
Board-specific configuration libraries
below).
You can omit any of the *_irq arguments. For example,
paddr,800:::801
specifies the interrupt numbers for GERROR and the PRI queue, but not for the Event or Command queue. - smmu_use_param
- On boards with ARM SMMU architectures, the syntax for smmu_use_param is as follows:
smmu_use_param sid
- sid
- The ID of the stream (StreamID in ARM nomenclature) the device uses to perform the transaction.
For example, the following shows how the smmu_use_param argument might be used for a J721e board, with the StreamID set in the configuration:
wheredevice mem:0x30b01000 use tcu 0xf003
tcu
is the name assigned to the SMMU unit in the configuration, and0xf003
is the StreamID.The following shows how the smmu_unit_param and smmu_use_param arguments might be uses for a J721e board, with the StreamID set at run time:device mem:0x02800000 use tcu *
Board-specific configuration libraries
Some boards that use ARM SMMUs require board-specific SMMU settings. If the cfg_dll argument is specified in smmu_unit_param, the smmu-armsmmu.so or smmu-armsmmuv3.so support library will load the specified configuration library, which looks after the board-specific settings.
- On NXP i.MX8 platforms, StreamIDs are configurable. Use the smmu_unit_param cfg_dll argument to have smmu-armsmmu.so load the smmu-cfg-imx8.so library, which will set the StreamIDs according to the configuration you specify in the smmuman configuration file.
- On J721e boards, StreamIDs are configurable. Use the smmu_unit_param cfg_dll argument to have smmu-armsmmuv3.so load the smmu-cfg-j721e.so library, which will set the StreamIDs according to the configuration you specify in the smmuman configuration file.