Kconfig 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. # IOMMU_API always gets selected by whoever wants it.
  2. config IOMMU_API
  3. bool
  4. menuconfig IOMMU_SUPPORT
  5. bool "IOMMU Hardware Support"
  6. default y
  7. ---help---
  8. Say Y here if you want to compile device drivers for IO Memory
  9. Management Units into the kernel. These devices usually allow to
  10. remap DMA requests and/or remap interrupts from other devices on the
  11. system.
  12. if IOMMU_SUPPORT
  13. config OF_IOMMU
  14. def_bool y
  15. depends on OF
  16. config FSL_PAMU
  17. bool "Freescale IOMMU support"
  18. depends on PPC_E500MC
  19. select IOMMU_API
  20. select GENERIC_ALLOCATOR
  21. help
  22. Freescale PAMU support. PAMU is the IOMMU present on Freescale QorIQ platforms.
  23. PAMU can authorize memory access, remap the memory address, and remap I/O
  24. transaction types.
  25. # MSM IOMMU support
  26. config MSM_IOMMU
  27. bool "MSM IOMMU Support"
  28. depends on ARCH_MSM8X60 || ARCH_MSM8960
  29. select IOMMU_API
  30. help
  31. Support for the IOMMUs found on certain Qualcomm SOCs.
  32. These IOMMUs allow virtualization of the address space used by most
  33. cores within the multimedia subsystem.
  34. If unsure, say N here.
  35. config IOMMU_PGTABLES_L2
  36. def_bool y
  37. depends on MSM_IOMMU && MMU && SMP && CPU_DCACHE_DISABLE=n
  38. # AMD IOMMU support
  39. config AMD_IOMMU
  40. bool "AMD IOMMU support"
  41. select SWIOTLB
  42. select PCI_MSI
  43. select PCI_ATS
  44. select PCI_PRI
  45. select PCI_PASID
  46. select IOMMU_API
  47. depends on X86_64 && PCI && ACPI && X86_IO_APIC
  48. ---help---
  49. With this option you can enable support for AMD IOMMU hardware in
  50. your system. An IOMMU is a hardware component which provides
  51. remapping of DMA memory accesses from devices. With an AMD IOMMU you
  52. can isolate the DMA memory of different devices and protect the
  53. system from misbehaving device drivers or hardware.
  54. You can find out if your system has an AMD IOMMU if you look into
  55. your BIOS for an option to enable it or if you have an IVRS ACPI
  56. table.
  57. config AMD_IOMMU_STATS
  58. bool "Export AMD IOMMU statistics to debugfs"
  59. depends on AMD_IOMMU
  60. select DEBUG_FS
  61. ---help---
  62. This option enables code in the AMD IOMMU driver to collect various
  63. statistics about whats happening in the driver and exports that
  64. information to userspace via debugfs.
  65. If unsure, say N.
  66. config AMD_IOMMU_V2
  67. tristate "AMD IOMMU Version 2 driver"
  68. depends on AMD_IOMMU && PROFILING
  69. select MMU_NOTIFIER
  70. ---help---
  71. This option enables support for the AMD IOMMUv2 features of the IOMMU
  72. hardware. Select this option if you want to use devices that support
  73. the PCI PRI and PASID interface.
  74. # Intel IOMMU support
  75. config DMAR_TABLE
  76. bool
  77. config INTEL_IOMMU
  78. bool "Support for Intel IOMMU using DMA Remapping Devices"
  79. depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC)
  80. select IOMMU_API
  81. select DMAR_TABLE
  82. help
  83. DMA remapping (DMAR) devices support enables independent address
  84. translations for Direct Memory Access (DMA) from devices.
  85. These DMA remapping devices are reported via ACPI tables
  86. and include PCI device scope covered by these DMA
  87. remapping devices.
  88. config INTEL_IOMMU_DEFAULT_ON
  89. def_bool y
  90. prompt "Enable Intel DMA Remapping Devices by default"
  91. depends on INTEL_IOMMU
  92. help
  93. Selecting this option will enable a DMAR device at boot time if
  94. one is found. If this option is not selected, DMAR support can
  95. be enabled by passing intel_iommu=on to the kernel.
  96. config INTEL_IOMMU_BROKEN_GFX_WA
  97. bool "Workaround broken graphics drivers (going away soon)"
  98. depends on INTEL_IOMMU && BROKEN && X86
  99. ---help---
  100. Current Graphics drivers tend to use physical address
  101. for DMA and avoid using DMA APIs. Setting this config
  102. option permits the IOMMU driver to set a unity map for
  103. all the OS-visible memory. Hence the driver can continue
  104. to use physical addresses for DMA, at least until this
  105. option is removed in the 2.6.32 kernel.
  106. config INTEL_IOMMU_FLOPPY_WA
  107. def_bool y
  108. depends on INTEL_IOMMU && X86
  109. ---help---
  110. Floppy disk drivers are known to bypass DMA API calls
  111. thereby failing to work when IOMMU is enabled. This
  112. workaround will setup a 1:1 mapping for the first
  113. 16MiB to make floppy (an ISA device) work.
  114. config IRQ_REMAP
  115. bool "Support for Interrupt Remapping"
  116. depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI
  117. select DMAR_TABLE
  118. ---help---
  119. Supports Interrupt remapping for IO-APIC and MSI devices.
  120. To use x2apic mode in the CPU's which support x2APIC enhancements or
  121. to support platforms with CPU's having > 8 bit APIC ID, say Y.
  122. # OMAP IOMMU support
  123. config OMAP_IOMMU
  124. bool "OMAP IOMMU Support"
  125. depends on ARCH_OMAP2PLUS
  126. select IOMMU_API
  127. config OMAP_IOVMM
  128. tristate "OMAP IO Virtual Memory Manager Support"
  129. depends on OMAP_IOMMU
  130. config OMAP_IOMMU_DEBUG
  131. tristate "Export OMAP IOMMU/IOVMM internals in DebugFS"
  132. depends on OMAP_IOVMM && DEBUG_FS
  133. help
  134. Select this to see extensive information about
  135. the internal state of OMAP IOMMU/IOVMM in debugfs.
  136. Say N unless you know you need this.
  137. config TEGRA_IOMMU_GART
  138. bool "Tegra GART IOMMU Support"
  139. depends on ARCH_TEGRA_2x_SOC
  140. select IOMMU_API
  141. help
  142. Enables support for remapping discontiguous physical memory
  143. shared with the operating system into contiguous I/O virtual
  144. space through the GART (Graphics Address Relocation Table)
  145. hardware included on Tegra SoCs.
  146. config TEGRA_IOMMU_SMMU
  147. bool "Tegra SMMU IOMMU Support"
  148. depends on ARCH_TEGRA && TEGRA_AHB
  149. select IOMMU_API
  150. help
  151. Enables support for remapping discontiguous physical memory
  152. shared with the operating system into contiguous I/O virtual
  153. space through the SMMU (System Memory Management Unit)
  154. hardware included on Tegra SoCs.
  155. config EXYNOS_IOMMU
  156. bool "Exynos IOMMU Support"
  157. depends on ARCH_EXYNOS && EXYNOS_DEV_SYSMMU
  158. select IOMMU_API
  159. help
  160. Support for the IOMMU(System MMU) of Samsung Exynos application
  161. processor family. This enables H/W multimedia accellerators to see
  162. non-linear physical memory chunks as a linear memory in their
  163. address spaces
  164. If unsure, say N here.
  165. config EXYNOS_IOMMU_DEBUG
  166. bool "Debugging log for Exynos IOMMU"
  167. depends on EXYNOS_IOMMU
  168. help
  169. Select this to see the detailed log message that shows what
  170. happens in the IOMMU driver
  171. Say N unless you need kernel log message for IOMMU debugging
  172. config SHMOBILE_IPMMU
  173. bool
  174. config SHMOBILE_IPMMU_TLB
  175. bool
  176. config SHMOBILE_IOMMU
  177. bool "IOMMU for Renesas IPMMU/IPMMUI"
  178. default n
  179. depends on (ARM && ARCH_SHMOBILE)
  180. select IOMMU_API
  181. select ARM_DMA_USE_IOMMU
  182. select SHMOBILE_IPMMU
  183. select SHMOBILE_IPMMU_TLB
  184. help
  185. Support for Renesas IPMMU/IPMMUI. This option enables
  186. remapping of DMA memory accesses from all of the IP blocks
  187. on the ICB.
  188. Warning: Drivers (including userspace drivers of UIO
  189. devices) of the IP blocks on the ICB *must* use addresses
  190. allocated from the IPMMU (iova) for DMA with this option
  191. enabled.
  192. If unsure, say N.
  193. choice
  194. prompt "IPMMU/IPMMUI address space size"
  195. default SHMOBILE_IOMMU_ADDRSIZE_2048MB
  196. depends on SHMOBILE_IOMMU
  197. help
  198. This option sets IPMMU/IPMMUI address space size by
  199. adjusting the 1st level page table size. The page table size
  200. is calculated as follows:
  201. page table size = number of page table entries * 4 bytes
  202. number of page table entries = address space size / 1 MiB
  203. For example, when the address space size is 2048 MiB, the
  204. 1st level page table size is 8192 bytes.
  205. config SHMOBILE_IOMMU_ADDRSIZE_2048MB
  206. bool "2 GiB"
  207. config SHMOBILE_IOMMU_ADDRSIZE_1024MB
  208. bool "1 GiB"
  209. config SHMOBILE_IOMMU_ADDRSIZE_512MB
  210. bool "512 MiB"
  211. config SHMOBILE_IOMMU_ADDRSIZE_256MB
  212. bool "256 MiB"
  213. config SHMOBILE_IOMMU_ADDRSIZE_128MB
  214. bool "128 MiB"
  215. config SHMOBILE_IOMMU_ADDRSIZE_64MB
  216. bool "64 MiB"
  217. config SHMOBILE_IOMMU_ADDRSIZE_32MB
  218. bool "32 MiB"
  219. endchoice
  220. config SHMOBILE_IOMMU_L1SIZE
  221. int
  222. default 8192 if SHMOBILE_IOMMU_ADDRSIZE_2048MB
  223. default 4096 if SHMOBILE_IOMMU_ADDRSIZE_1024MB
  224. default 2048 if SHMOBILE_IOMMU_ADDRSIZE_512MB
  225. default 1024 if SHMOBILE_IOMMU_ADDRSIZE_256MB
  226. default 512 if SHMOBILE_IOMMU_ADDRSIZE_128MB
  227. default 256 if SHMOBILE_IOMMU_ADDRSIZE_64MB
  228. default 128 if SHMOBILE_IOMMU_ADDRSIZE_32MB
  229. config SPAPR_TCE_IOMMU
  230. bool "sPAPR TCE IOMMU Support"
  231. depends on PPC_POWERNV || PPC_PSERIES
  232. select IOMMU_API
  233. help
  234. Enables bits of IOMMU API required by VFIO. The iommu_ops
  235. is not implemented as it is not necessary for VFIO.
  236. config ARM_SMMU
  237. bool "ARM Ltd. System MMU (SMMU) Support"
  238. depends on ARM64 || (ARM_LPAE && OF)
  239. select IOMMU_API
  240. select ARM_DMA_USE_IOMMU if ARM
  241. help
  242. Support for implementations of the ARM System MMU architecture
  243. versions 1 and 2. The driver supports both v7l and v8l table
  244. formats with 4k and 64k page sizes.
  245. Say Y here if your SoC includes an IOMMU device implementing
  246. the ARM SMMU architecture.
  247. endif # IOMMU_SUPPORT