WS cleanup: remove SPACE(s) followed by TAB
[platform/kernel/u-boot.git] / arch / arm / cpu / armv8 / fsl-layerscape / doc / README.pci_iommu_extra
1 #
2 # Copyright 2020 NXP
3 #
4 # SPDX-License-Identifier:      GPL-2.0+
5 #
6
7 Specifying extra IOMMU mappings for PCI controllers
8
9 This feature can be enabled through the PCI_IOMMU_EXTRA_MAPPINGS Kconfig option.
10
11 The "pci_iommu_extra" env var or "pci-iommu-extra" device tree property (to be
12 used for example in more static scenarios such as hardwired PCI endpoints that
13 get initialized later in the system setup) allows two things:
14  - for a SRIOV capable PCI EP identified by its B.D.F specify the maximum number
15    of VFs that will ever be created for it
16  - for hot-plug case, specify the B.D.F with which the device will show up on
17    the PCI bus
18
19 The env var consists of a list of <bdf>,<action> pairs for a certain pci bus
20 identified by its controller's base register address, as defined in the "reg"
21 property in the device tree.
22
23 pci_iommu_extra = pci@<addr1>,<bdf>,<action>,<bdf>,<action>,
24                   pci@<addr2>,<bdf>,<action>,<bdf>,<action>,...
25
26 where:
27  <addr> is the base register address of the pci controller for which the
28         subsequent <bdf>,<action> pairs apply
29  <bdf> identifies to which B.D.F the action applies to
30  <action> can be:
31     - "vfs=<number>" to specify that for the PCI EP identified previously by
32       the <bdf> to include mappings for <number> of VFs.
33       The variant "noari_vfs=<number>" is available to disable taking ARI into
34       account.
35     - "hp" to specify that on this <bdf> there will be a hot-plugged device so
36       it needs a mapping
37 The device tree property must be placed under the correct pci controller node
38 and only the bdf and action pairs need to be specified, like this:
39
40 pci-iommu-extra = "<bdf>,<action>,<bdf>,<action>,...";
41
42 Note: the env var has priority over the device tree property.
43
44 For example, given this configuration on bus 6:
45
46 => pci 6
47 Scanning PCI devices on bus 6
48 BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
49 _____________________________________________________________
50 06.00.00   0x8086     0x1572     Network controller      0x00
51 06.00.01   0x8086     0x1572     Network controller      0x00
52
53 The following u-boot env var will create iommu mappings for 3 VFs for each PF:
54
55 => setenv pci_iommu_extra pci@0x3800000,6.0.0,vfs=3,6.0.1,vfs=3
56
57 For the device tree case, this would be specified like this:
58
59 pci-iommu-extra = "6.0.0,vfs=3,6.0.1,vfs=3";
60
61 To add an iommu mapping for a hot-plugged device, please see following example:
62
63 => setenv pci_iommu_extra pci@0x3800000,2.16.0,hp
64
65 For the device tree case, this would be specified like this:
66
67 pci-iommu-extra = "2.16.0,hp";