blob: aa6947505bdcf9996e192810eab225eb73cf414c [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"
Stepan Moskovchenkoe90cd652013-04-18 12:54:47 -070019 depends on ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_APQ8064 || ARCH_MSM8974 || ARCH_MPQ8092 || ARCH_MSM8610 || ARCH_MSM8226 || ARCH_APQ8084
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"
Olav Haugan7a2f99c2013-02-04 14:43:26 -080041 depends on (ARCH_MSM8974 || ARCH_MSM8610 || ARCH_MSM8226) && MSM_IOMMU
Olav Haugan99660ca2012-12-04 13:30:41 -080042 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 help
53 Improves TLB miss latency at the expense of potential L2 pollution.
54 However, with large multimedia buffers, the TLB should mostly contain
55 section mappings and TLB misses should be quite infrequent.
56 Most people can probably say Y here.
Ohad Ben-Cohen29b68412011-06-05 18:22:18 +030057
58# AMD IOMMU support
59config AMD_IOMMU
60 bool "AMD IOMMU support"
61 select SWIOTLB
62 select PCI_MSI
Joerg Roedel52815b72011-11-17 17:24:28 +010063 select PCI_ATS
64 select PCI_PRI
65 select PCI_PASID
Ohad Ben-Cohen29b68412011-06-05 18:22:18 +030066 select IOMMU_API
67 depends on X86_64 && PCI && ACPI
68 ---help---
69 With this option you can enable support for AMD IOMMU hardware in
70 your system. An IOMMU is a hardware component which provides
71 remapping of DMA memory accesses from devices. With an AMD IOMMU you
72 can isolate the the DMA memory of different devices and protect the
73 system from misbehaving device drivers or hardware.
74
75 You can find out if your system has an AMD IOMMU if you look into
76 your BIOS for an option to enable it or if you have an IVRS ACPI
77 table.
78
79config AMD_IOMMU_STATS
80 bool "Export AMD IOMMU statistics to debugfs"
81 depends on AMD_IOMMU
82 select DEBUG_FS
83 ---help---
84 This option enables code in the AMD IOMMU driver to collect various
85 statistics about whats happening in the driver and exports that
86 information to userspace via debugfs.
87 If unsure, say N.
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +030088
Joerg Roedele3c495c2011-11-09 12:31:15 +010089config AMD_IOMMU_V2
90 tristate "AMD IOMMU Version 2 driver (EXPERIMENTAL)"
Joerg Roedel8736b2c2011-11-24 16:21:52 +010091 depends on AMD_IOMMU && PROFILING && EXPERIMENTAL
92 select MMU_NOTIFIER
Joerg Roedele3c495c2011-11-09 12:31:15 +010093 ---help---
94 This option enables support for the AMD IOMMUv2 features of the IOMMU
95 hardware. Select this option if you want to use devices that support
96 the the PCI PRI and PASID interface.
97
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +030098# Intel IOMMU support
Suresh Siddhad3f13812011-08-23 17:05:25 -070099config DMAR_TABLE
100 bool
101
102config INTEL_IOMMU
103 bool "Support for Intel IOMMU using DMA Remapping Devices"
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300104 depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC)
105 select IOMMU_API
Suresh Siddhad3f13812011-08-23 17:05:25 -0700106 select DMAR_TABLE
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300107 help
108 DMA remapping (DMAR) devices support enables independent address
109 translations for Direct Memory Access (DMA) from devices.
110 These DMA remapping devices are reported via ACPI tables
111 and include PCI device scope covered by these DMA
112 remapping devices.
113
Suresh Siddhad3f13812011-08-23 17:05:25 -0700114config INTEL_IOMMU_DEFAULT_ON
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300115 def_bool y
Suresh Siddhad3f13812011-08-23 17:05:25 -0700116 prompt "Enable Intel DMA Remapping Devices by default"
117 depends on INTEL_IOMMU
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300118 help
119 Selecting this option will enable a DMAR device at boot time if
120 one is found. If this option is not selected, DMAR support can
121 be enabled by passing intel_iommu=on to the kernel.
122
Suresh Siddhad3f13812011-08-23 17:05:25 -0700123config INTEL_IOMMU_BROKEN_GFX_WA
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300124 bool "Workaround broken graphics drivers (going away soon)"
Suresh Siddhad3f13812011-08-23 17:05:25 -0700125 depends on INTEL_IOMMU && BROKEN && X86
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300126 ---help---
127 Current Graphics drivers tend to use physical address
128 for DMA and avoid using DMA APIs. Setting this config
129 option permits the IOMMU driver to set a unity map for
130 all the OS-visible memory. Hence the driver can continue
131 to use physical addresses for DMA, at least until this
132 option is removed in the 2.6.32 kernel.
133
Suresh Siddhad3f13812011-08-23 17:05:25 -0700134config INTEL_IOMMU_FLOPPY_WA
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300135 def_bool y
Suresh Siddhad3f13812011-08-23 17:05:25 -0700136 depends on INTEL_IOMMU && X86
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300137 ---help---
138 Floppy disk drivers are known to bypass DMA API calls
139 thereby failing to work when IOMMU is enabled. This
140 workaround will setup a 1:1 mapping for the first
141 16MiB to make floppy (an ISA device) work.
142
Suresh Siddhad3f13812011-08-23 17:05:25 -0700143config IRQ_REMAP
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300144 bool "Support for Interrupt Remapping (EXPERIMENTAL)"
145 depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL
Suresh Siddhad3f13812011-08-23 17:05:25 -0700146 select DMAR_TABLE
Ohad Ben-Cohen166e9272011-06-10 21:42:27 +0300147 ---help---
148 Supports Interrupt remapping for IO-APIC and MSI devices.
149 To use x2apic mode in the CPU's which support x2APIC enhancements or
150 to support platforms with CPU's having > 8 bit APIC ID, say Y.
Joerg Roedel68255b62011-06-14 15:51:54 +0200151
Ohad Ben-Cohenfcf3a6e2011-08-15 23:21:41 +0300152# OMAP IOMMU support
153config OMAP_IOMMU
154 bool "OMAP IOMMU Support"
Ohad Ben-Cohen024ae882011-08-29 07:57:44 +0300155 depends on ARCH_OMAP
Ohad Ben-Cohenfcf3a6e2011-08-15 23:21:41 +0300156 select IOMMU_API
157
158config OMAP_IOVMM
Joerg Roedel7b6d45f2011-09-14 16:03:45 +0200159 tristate "OMAP IO Virtual Memory Manager Support"
160 depends on OMAP_IOMMU
Ohad Ben-Cohenfcf3a6e2011-08-15 23:21:41 +0300161
162config OMAP_IOMMU_DEBUG
163 tristate "Export OMAP IOMMU/IOVMM internals in DebugFS"
164 depends on OMAP_IOVMM && DEBUG_FS
165 help
166 Select this to see extensive information about
167 the internal state of OMAP IOMMU/IOVMM in debugfs.
168
169 Say N unless you know you need this.
170
Hiroshi DOYUd53e54b2011-11-16 17:36:37 +0200171config TEGRA_IOMMU_GART
172 bool "Tegra GART IOMMU Support"
173 depends on ARCH_TEGRA_2x_SOC
174 select IOMMU_API
175 help
176 Enables support for remapping discontiguous physical memory
177 shared with the operating system into contiguous I/O virtual
178 space through the GART (Graphics Address Relocation Table)
179 hardware included on Tegra SoCs.
180
Hiroshi DOYU7a31f6f2011-11-17 07:31:31 +0200181config TEGRA_IOMMU_SMMU
182 bool "Tegra SMMU IOMMU Support"
183 depends on ARCH_TEGRA_3x_SOC
184 select IOMMU_API
185 help
186 Enables support for remapping discontiguous physical memory
187 shared with the operating system into contiguous I/O virtual
188 space through the SMMU (System Memory Management Unit)
189 hardware included on Tegra SoCs.
190
Joerg Roedel68255b62011-06-14 15:51:54 +0200191endif # IOMMU_SUPPORT