System memory management unit (IOMMU/SMMU) manager
The IOMMU/SMMU Manager (smmuman) is not a QNX Hypervisor component. It is a QNX Neutrino OS component. It is described here for the convenience of hypervisor users.
Correct configuration of smmuman requires careful attention to architecture- and board-specific details. Consult your board manufacturer's documentation for the locations and values you must use for your SoC.
smmuman options
QNX Neutrino
Options may be specified in the command line, or in a *.smmu configuration file (e.g., apollo_lake.smmu, rcar3-h3.smmu), or both. In a configuration file, anything that follows a # character is considered a comment and ignored.
To use a *.smmu configuration file, in the command line enter an @ followed by the filename. For example:
smmuman @rcar3-h3.smmu
Add to the set of addresses DMA may be used to or from. Use the parameters as follows:
Mark the current device (the device specified by the preceeding device option) as having a reserved section of memory starting at start_paddr and continuing for length bytes. For example:
device pci:0:15.1 reserved 0x7afe0000,0x20000
Load the smmu-smmu_type.so support file, and call its initialization routine, passing smmu_type_parm to the routine. For example:
smmu rcar3 0xe67b0000,228,0x4f.0x01,0x4f.0x10,0x4f.0x20
will load the smmu-rcar3.so with the specified parameters, while:
smmu vtd ignore
will load smmu-vtd.so with the ignore parameters specified.
For more information about smmu_type_parm, see Board-specific configuration below.
Define an individual IOMMU/SMMU unit with name unit_name. The type of the unit will be from the preceeding smmu option. The unit initialization routine will be invoked and passed smmu_unit_parm. For example, for an ARM board:
smmu rcar3 0xe67b0000,228,0x4f.0x01,0x4f.0x10,0x4f.0x20 unit vi0 0xfebd0000,14 # video IO domain AXI unit vi1 0xfebe0000,15 # video IO domain AXI ... unit ir 0xff8b0000,3 # IMP domain AXI unit hc 0xe6570000,2 # high communication domain AXI ...
Or, for an x86 board:
smmu vtd ignore unit vtd1 0xfed64000 unit vtd2 0xfed65000
For more information about smmu_unit_parm, see Board-specific configuration below.
The current device (the preceeding device option) will use the IOMMU/SMMU unit identified by unit_name. The smmu_use_parm provides additional information on the device to the IOMMU/SMMU unit.
For more information about smmu_use_parm, see Board-specific configuration below.
The syntax for the smmu_*_parm parameters differs according to the type of IOMMU/SMMU. Below are examples of configurations for two types of IOMMU/SMMU on QNX Hypervisor reference boards.
On these boards the syntax for smmu_type_parm is as follows:
paddr,fault_vector,{,socid.revid}
For example:
smmu rcar3 0xe67b0000,228,0x4f.0x01,0x4f.0x10,0x4f.0x20
where 0xe67b0000 is the physical address of the main memory IPMMU unit registers, 228 is the interrupt that occurs when an illegal DMA request is attempted, and 0x4f.0x01, 0x4f.0x10 and 0x4f.0x20 are the ID and revision numbers of SoCs supported by the configuration data.
On these boards the syntax for smmu_unit_parm is as follows:
paddr,intr_status_bit
On these boards the syntax for smmu_use_parm is as follows:
utlb
On these boards the syntax for smmu_type_parm is as follows:
require | ignore
On these boards the syntax for smmu_unit_parm is as follows:
vtd-paddr
On these boards no value is required or permitted for smmu_use_parm.
The most common way to start smmuman for x86 systems is:
smmuman smmu vtd
This startup configures smmuman to use the default ACPI tables, and the default locations for VT-d.
The SMMU manager (smmuman) works with the IOMMUs or SMMUs on supported hardware platforms to:
As it reads through its configuration information, smmuman performs textual substitutions to its configuration information when it encounters the following character sequences:
You can use this textual substitution to make your configuration more robust by having the host startup place values in the system page asinfo entry where they can be picked up by smmuman.
For more information about the system page asinfo data structure array, see the System Page chapter in Building Embedded Systems.
For information about using smmuman in a QNX Hypervisor system, see DMA device containment (smmuman) in the Using Your Hypervisor System chapter.