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.
The configurations described here are for use with the smmu-armsmmu.so and smmu-armsmmu-safety.so support libraries for ARM SMMUs. 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.
To load one of these support libraries you must set the smmu option's smmu_type argument to the name of the support library:
- smmu-armsmmu.so for non-safety systems
- smmu-armsmmu-safety.so for safety-related systems
Options for Renesas R-Car IPMMUsbelow.
Options
The following describes the options for a smmuman service using a smmu-armsmmu.so or smmu-armsmmu-safety.so support library.
- smmu_type_param
On boards that use the ARM SMMU architecture, the smmu_type_param argument requires no further arguments. For example:
smmu armsmmuwhere
smmu-armsmmu[-safety].sois 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 to0(zero) to not bypass unidentified streams (seeBoard-specific configuration libraries
below). - res_sid
- Optional. A list of StreamIDs reserved for the system. Entries
in the list 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:
unit mmu500 0x51400000,64,66,1,4:5:16,imx8where
mmu500is the name assigned to the SMMU unit in the configuration (seeGlobal options
),0x514000000is the physical address of the SMMU unit registers,64is the number of the interrupt to assert when a context fault occurs,66is the number of the interrupt to assert when a global fault occurs,1instructs smmuman to bypass unidentified streams,4:5:16specifies that StreamIDs 4, 5 and 16 are reserved for the system, andimx8instructs 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:
device mem:0x5b040000 use mmu500 9where
mmu500is the name assigned to the SMMU unit in the configuration, and9is the StreamID.The following shows how the smmu_unit_param and smmu_use_param arguments might be uses for an i.MX8 board, with the StreamID set at run time:
StreamID set at run time
The following shows part of the configuration for an i.MX8 board, with the StreamID for a device 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:
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 runtime.
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 support library will load the specified configuration library, which looks after the board-specific settings.
These libraries with board-specific settings are named as follows: smmu-cfg-board.so, where board is the board name.
For example, 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.
