Kconfig 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  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
  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
  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_IOMMU_DEBUG
  128. tristate "Export OMAP IOMMU internals in DebugFS"
  129. depends on OMAP_IOMMU && DEBUG_FS
  130. help
  131. Select this to see extensive information about
  132. the internal state of OMAP IOMMU in debugfs.
  133. Say N unless you know you need this.
  134. config TEGRA_IOMMU_GART
  135. bool "Tegra GART IOMMU Support"
  136. depends on ARCH_TEGRA_2x_SOC
  137. select IOMMU_API
  138. help
  139. Enables support for remapping discontiguous physical memory
  140. shared with the operating system into contiguous I/O virtual
  141. space through the GART (Graphics Address Relocation Table)
  142. hardware included on Tegra SoCs.
  143. config TEGRA_IOMMU_SMMU
  144. bool "Tegra SMMU IOMMU Support"
  145. depends on ARCH_TEGRA && TEGRA_AHB
  146. select IOMMU_API
  147. help
  148. Enables support for remapping discontiguous physical memory
  149. shared with the operating system into contiguous I/O virtual
  150. space through the SMMU (System Memory Management Unit)
  151. hardware included on Tegra SoCs.
  152. config EXYNOS_IOMMU
  153. bool "Exynos IOMMU Support"
  154. depends on ARCH_EXYNOS
  155. select IOMMU_API
  156. select ARM_DMA_USE_IOMMU
  157. help
  158. Support for the IOMMU (System MMU) of Samsung Exynos application
  159. processor family. This enables H/W multimedia accelerators to see
  160. non-linear physical memory chunks as linear memory in their
  161. address space.
  162. If unsure, say N here.
  163. config EXYNOS_IOMMU_DEBUG
  164. bool "Debugging log for Exynos IOMMU"
  165. depends on EXYNOS_IOMMU
  166. help
  167. Select this to see the detailed log message that shows what
  168. happens in the IOMMU driver.
  169. Say N unless you need kernel log message for IOMMU debugging.
  170. config SHMOBILE_IPMMU
  171. bool
  172. config SHMOBILE_IPMMU_TLB
  173. bool
  174. config SHMOBILE_IOMMU
  175. bool "IOMMU for Renesas IPMMU/IPMMUI"
  176. default n
  177. depends on ARM
  178. depends on ARCH_SHMOBILE || COMPILE_TEST
  179. select IOMMU_API
  180. select ARM_DMA_USE_IOMMU
  181. select SHMOBILE_IPMMU
  182. select SHMOBILE_IPMMU_TLB
  183. help
  184. Support for Renesas IPMMU/IPMMUI. This option enables
  185. remapping of DMA memory accesses from all of the IP blocks
  186. on the ICB.
  187. Warning: Drivers (including userspace drivers of UIO
  188. devices) of the IP blocks on the ICB *must* use addresses
  189. allocated from the IPMMU (iova) for DMA with this option
  190. enabled.
  191. If unsure, say N.
  192. choice
  193. prompt "IPMMU/IPMMUI address space size"
  194. default SHMOBILE_IOMMU_ADDRSIZE_2048MB
  195. depends on SHMOBILE_IOMMU
  196. help
  197. This option sets IPMMU/IPMMUI address space size by
  198. adjusting the 1st level page table size. The page table size
  199. is calculated as follows:
  200. page table size = number of page table entries * 4 bytes
  201. number of page table entries = address space size / 1 MiB
  202. For example, when the address space size is 2048 MiB, the
  203. 1st level page table size is 8192 bytes.
  204. config SHMOBILE_IOMMU_ADDRSIZE_2048MB
  205. bool "2 GiB"
  206. config SHMOBILE_IOMMU_ADDRSIZE_1024MB
  207. bool "1 GiB"
  208. config SHMOBILE_IOMMU_ADDRSIZE_512MB
  209. bool "512 MiB"
  210. config SHMOBILE_IOMMU_ADDRSIZE_256MB
  211. bool "256 MiB"
  212. config SHMOBILE_IOMMU_ADDRSIZE_128MB
  213. bool "128 MiB"
  214. config SHMOBILE_IOMMU_ADDRSIZE_64MB
  215. bool "64 MiB"
  216. config SHMOBILE_IOMMU_ADDRSIZE_32MB
  217. bool "32 MiB"
  218. endchoice
  219. config SHMOBILE_IOMMU_L1SIZE
  220. int
  221. default 8192 if SHMOBILE_IOMMU_ADDRSIZE_2048MB
  222. default 4096 if SHMOBILE_IOMMU_ADDRSIZE_1024MB
  223. default 2048 if SHMOBILE_IOMMU_ADDRSIZE_512MB
  224. default 1024 if SHMOBILE_IOMMU_ADDRSIZE_256MB
  225. default 512 if SHMOBILE_IOMMU_ADDRSIZE_128MB
  226. default 256 if SHMOBILE_IOMMU_ADDRSIZE_64MB
  227. default 128 if SHMOBILE_IOMMU_ADDRSIZE_32MB
  228. config IPMMU_VMSA
  229. bool "Renesas VMSA-compatible IPMMU"
  230. depends on ARM_LPAE
  231. depends on ARCH_SHMOBILE || COMPILE_TEST
  232. select IOMMU_API
  233. select ARM_DMA_USE_IOMMU
  234. help
  235. Support for the Renesas VMSA-compatible IPMMU Renesas found in the
  236. R-Mobile APE6 and R-Car H2/M2 SoCs.
  237. If unsure, say N.
  238. config SPAPR_TCE_IOMMU
  239. bool "sPAPR TCE IOMMU Support"
  240. depends on PPC_POWERNV || PPC_PSERIES
  241. select IOMMU_API
  242. help
  243. Enables bits of IOMMU API required by VFIO. The iommu_ops
  244. is not implemented as it is not necessary for VFIO.
  245. config ARM_SMMU
  246. bool "ARM Ltd. System MMU (SMMU) Support"
  247. depends on ARM64 || (ARM_LPAE && OF)
  248. select IOMMU_API
  249. select ARM_DMA_USE_IOMMU if ARM
  250. help
  251. Support for implementations of the ARM System MMU architecture
  252. versions 1 and 2. The driver supports both v7l and v8l table
  253. formats with 4k and 64k page sizes.
  254. Say Y here if your SoC includes an IOMMU device implementing
  255. the ARM SMMU architecture.
  256. endif # IOMMU_SUPPORT