Kconfig 7.6 KB

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