blob: 4f54a0c901b11926adfb6d54111e07f1754abd2e [file] [log] [blame]
Ohad Ben-Cohenab493a02011-06-02 02:48:05 +03001# IOMMU_API always gets selected by whoever wants it.
2config IOMMU_API
3 bool
Ohad Ben-Cohenb10f1272011-06-02 03:20:08 +03004
Joerg Roedel68255b62011-06-14 15:51:54 +02005menuconfig IOMMU_SUPPORT
6 bool "IOMMU Hardware Support"
7 default y
8 ---help---
9 Say Y here if you want to compile device drivers for IO Memory
10 Management Units into the kernel. These devices usually allow to
11 remap DMA requests and/or remap interrupts from other devices on the
12 system.
13
14if IOMMU_SUPPORT
15
Ohad Ben-Cohenb10f1272011-06-02 03:20:08 +030016# MSM IOMMU support
17config MSM_IOMMU
18 bool "MSM IOMMU Support"
Mitchel Humpherysd1717802012-11-09 09:54:54 -080019 depends on ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_APQ8064 || ARCH_MSM8974 || ARCH_MPQ8092 || ARCH_MSM8910 || ARCH_MSM8226
Ohad Ben-Cohenb10f1272011-06-02 03:20:08 +030020 select IOMMU_API
21 help
22 Support for the IOMMUs found on certain Qualcomm SOCs.
23 These IOMMUs allow virtualization of the address space used by most
24 cores within the multimedia subsystem.
25
26 If unsure, say N here.
27
Olav Haugan65209cd2012-11-07 15:02:56 -080028# MSM IOMMU CPU-GPU sync programming support
29config MSM_IOMMU_GPU_SYNC
30 bool "MSM IOMMU CPU-GPU Sync Support"
31 depends on (ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_APQ8064 || ARCH_MSM8930) && MSM_IOMMU && MSM_REMOTE_SPINLOCK_SFPB
32 help
33 Say Y here if you want to synchronize access to IOMMU configuration
34 port between CPU and GPU. CPU will grab a remote spinlock before
35 accessing IOMMU configuration registers and GPU will do the same.
36
37 If unsure, say N here.
38
Olav Haugan99660ca2012-12-04 13:30:41 -080039config MSM_IOMMU_PMON
40 bool "MSM IOMMU Perfomance Monitoring Support"
41 depends on ARCH_MSM8974 && MSM_IOMMU
42 help
43 Support for monitoring IOMMUs performance on certain Qualcomm SOCs.
44 It captures TLB statistics per context bank of the IOMMU as an
45 indication of its performance metric.
46
47 If unsure, say N here.
48
Ohad Ben-Cohenb10f1272011-06-02 03:20:08 +030049config IOMMU_PGTABLES_L2
Steve Mucklef132c6c2012-06-06 18:30:57 -070050 bool "Allow SMMU page tables in the L2 cache (Experimental)"
Ohad Ben-Cohenb10f1272011-06-02 03:20:08 +030051 depends on MSM_IOMMU && MMU && SMP && CPU_DCACHE_DISABLE=n
Steve Mucklef132c6c2012-06-06 18:30:57 -070052 default y
53 help
54 Improves TLB miss latency at the expense of potential L2 pollution.
55 However, with large multimedia buffers, the TLB should mostly contain
56 section mappings and TLB misses should be quite infrequent.
57 Most people can probably say Y here.
Ohad Ben-Cohen29b68412011-06-05 18:22:18 +030058
59# AMD IOMMU support
60config AMD_IOMMU
61 bool "AMD IOMMU support"
62 select SWIOTLB
63 select PCI_MSI
Joerg Roedel52815b72011-11-17 17:24:28 +010064 select PCI_ATS
65 select PCI_PRI
66 select PCI_PASID
Ohad Ben-Cohen29b68412011-06-05 18:22:18 +030067 select IOMMU_API
68 depends on X86_64 && PCI && ACPI
69 ---help---
70 With this option you can enable support for AMD IOMMU hardware in
71 your system. An IOMMU is a hardware component which provides
72 remapping of DMA memory accesses from devices. With an AMD IOMMU you
73 can isolate the the DMA memory of different devices and protect the
74 system from misbehaving device drivers or hardware.
75
76 You can find out if your system has an AMD IOMMU if you look into
77 your BIOS for an option to enable it or if you have an IVRS ACPI
78 table.
79
80config AMD_IOMMU_STATS
81 bool "Export AMD IOMMU statistics to debugfs"
82 depends on AMD_IOMMU
83 select DEBUG_FS
84 ---help---
85 This option enables code in the AMD IOMMU driver to collect various
86 statistics about whats happening in the driver and exports that
87 information to userspace via debugfs.
88 If unsure, say N.
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +030089
Joerg Roedele3c495c2011-11-09 12:31:15 +010090config AMD_IOMMU_V2
91 tristate "AMD IOMMU Version 2 driver (EXPERIMENTAL)"
Joerg Roedel8736b2c2011-11-24 16:21:52 +010092 depends on AMD_IOMMU && PROFILING && EXPERIMENTAL
93 select MMU_NOTIFIER
Joerg Roedele3c495c2011-11-09 12:31:15 +010094 ---help---
95 This option enables support for the AMD IOMMUv2 features of the IOMMU
96 hardware. Select this option if you want to use devices that support
97 the the PCI PRI and PASID interface.
98
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +030099# Intel IOMMU support
Suresh Siddhad3f13812011-08-23 17:05:25 -0700100config DMAR_TABLE
101 bool
102
103config INTEL_IOMMU
104 bool "Support for Intel IOMMU using DMA Remapping Devices"
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300105 depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC)
106 select IOMMU_API
Suresh Siddhad3f13812011-08-23 17:05:25 -0700107 select DMAR_TABLE
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300108 help
109 DMA remapping (DMAR) devices support enables independent address
110 translations for Direct Memory Access (DMA) from devices.
111 These DMA remapping devices are reported via ACPI tables
112 and include PCI device scope covered by these DMA
113 remapping devices.
114
Suresh Siddhad3f13812011-08-23 17:05:25 -0700115config INTEL_IOMMU_DEFAULT_ON
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300116 def_bool y
Suresh Siddhad3f13812011-08-23 17:05:25 -0700117 prompt "Enable Intel DMA Remapping Devices by default"
118 depends on INTEL_IOMMU
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300119 help
120 Selecting this option will enable a DMAR device at boot time if
121 one is found. If this option is not selected, DMAR support can
122 be enabled by passing intel_iommu=on to the kernel.
123
Suresh Siddhad3f13812011-08-23 17:05:25 -0700124config INTEL_IOMMU_BROKEN_GFX_WA
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300125 bool "Workaround broken graphics drivers (going away soon)"
Suresh Siddhad3f13812011-08-23 17:05:25 -0700126 depends on INTEL_IOMMU && BROKEN && X86
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300127 ---help---
128 Current Graphics drivers tend to use physical address
129 for DMA and avoid using DMA APIs. Setting this config
130 option permits the IOMMU driver to set a unity map for
131 all the OS-visible memory. Hence the driver can continue
132 to use physical addresses for DMA, at least until this
133 option is removed in the 2.6.32 kernel.
134
Suresh Siddhad3f13812011-08-23 17:05:25 -0700135config INTEL_IOMMU_FLOPPY_WA
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300136 def_bool y
Suresh Siddhad3f13812011-08-23 17:05:25 -0700137 depends on INTEL_IOMMU && X86
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300138 ---help---
139 Floppy disk drivers are known to bypass DMA API calls
140 thereby failing to work when IOMMU is enabled. This
141 workaround will setup a 1:1 mapping for the first
142 16MiB to make floppy (an ISA device) work.
143
Suresh Siddhad3f13812011-08-23 17:05:25 -0700144config IRQ_REMAP
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300145 bool "Support for Interrupt Remapping (EXPERIMENTAL)"
146 depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL
Suresh Siddhad3f13812011-08-23 17:05:25 -0700147 select DMAR_TABLE
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300148 ---help---
149 Supports Interrupt remapping for IO-APIC and MSI devices.
150 To use x2apic mode in the CPU's which support x2APIC enhancements or
151 to support platforms with CPU's having > 8 bit APIC ID, say Y.
Joerg Roedel68255b62011-06-14 15:51:54 +0200152
Ohad Ben-Cohenfcf3a6e2011-08-15 23:21:41 +0300153# OMAP IOMMU support
154config OMAP_IOMMU
155 bool "OMAP IOMMU Support"
Ohad Ben-Cohen024ae882011-08-29 07:57:44 +0300156 depends on ARCH_OMAP
Ohad Ben-Cohenfcf3a6e2011-08-15 23:21:41 +0300157 select IOMMU_API
158
159config OMAP_IOVMM
Joerg Roedel7b6d45f2011-09-14 16:03:45 +0200160 tristate "OMAP IO Virtual Memory Manager Support"
161 depends on OMAP_IOMMU
Ohad Ben-Cohenfcf3a6e2011-08-15 23:21:41 +0300162
163config OMAP_IOMMU_DEBUG
164 tristate "Export OMAP IOMMU/IOVMM internals in DebugFS"
165 depends on OMAP_IOVMM && DEBUG_FS
166 help
167 Select this to see extensive information about
168 the internal state of OMAP IOMMU/IOVMM in debugfs.
169
170 Say N unless you know you need this.
171
Hiroshi DOYUd53e54b2011-11-16 17:36:37 +0200172config TEGRA_IOMMU_GART
173 bool "Tegra GART IOMMU Support"
174 depends on ARCH_TEGRA_2x_SOC
175 select IOMMU_API
176 help
177 Enables support for remapping discontiguous physical memory
178 shared with the operating system into contiguous I/O virtual
179 space through the GART (Graphics Address Relocation Table)
180 hardware included on Tegra SoCs.
181
Hiroshi DOYU7a31f6f2011-11-17 07:31:31 +0200182config TEGRA_IOMMU_SMMU
183 bool "Tegra SMMU IOMMU Support"
184 depends on ARCH_TEGRA_3x_SOC
185 select IOMMU_API
186 help
187 Enables support for remapping discontiguous physical memory
188 shared with the operating system into contiguous I/O virtual
189 space through the SMMU (System Memory Management Unit)
190 hardware included on Tegra SoCs.
191
Joerg Roedel68255b62011-06-14 15:51:54 +0200192endif # IOMMU_SUPPORT