18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_ci# AMD IOMMU support
38c2ecf20Sopenharmony_ciconfig AMD_IOMMU
48c2ecf20Sopenharmony_ci	bool "AMD IOMMU support"
58c2ecf20Sopenharmony_ci	select SWIOTLB
68c2ecf20Sopenharmony_ci	select PCI_MSI
78c2ecf20Sopenharmony_ci	select PCI_ATS
88c2ecf20Sopenharmony_ci	select PCI_PRI
98c2ecf20Sopenharmony_ci	select PCI_PASID
108c2ecf20Sopenharmony_ci	select IOMMU_API
118c2ecf20Sopenharmony_ci	select IOMMU_IOVA
128c2ecf20Sopenharmony_ci	select IOMMU_DMA
138c2ecf20Sopenharmony_ci	depends on X86_64 && PCI && ACPI && HAVE_CMPXCHG_DOUBLE
148c2ecf20Sopenharmony_ci	help
158c2ecf20Sopenharmony_ci	  With this option you can enable support for AMD IOMMU hardware in
168c2ecf20Sopenharmony_ci	  your system. An IOMMU is a hardware component which provides
178c2ecf20Sopenharmony_ci	  remapping of DMA memory accesses from devices. With an AMD IOMMU you
188c2ecf20Sopenharmony_ci	  can isolate the DMA memory of different devices and protect the
198c2ecf20Sopenharmony_ci	  system from misbehaving device drivers or hardware.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci	  You can find out if your system has an AMD IOMMU if you look into
228c2ecf20Sopenharmony_ci	  your BIOS for an option to enable it or if you have an IVRS ACPI
238c2ecf20Sopenharmony_ci	  table.
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ciconfig AMD_IOMMU_V2
268c2ecf20Sopenharmony_ci	tristate "AMD IOMMU Version 2 driver"
278c2ecf20Sopenharmony_ci	depends on AMD_IOMMU
288c2ecf20Sopenharmony_ci	select MMU_NOTIFIER
298c2ecf20Sopenharmony_ci	help
308c2ecf20Sopenharmony_ci	  This option enables support for the AMD IOMMUv2 features of the IOMMU
318c2ecf20Sopenharmony_ci	  hardware. Select this option if you want to use devices that support
328c2ecf20Sopenharmony_ci	  the PCI PRI and PASID interface.
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ciconfig AMD_IOMMU_DEBUGFS
358c2ecf20Sopenharmony_ci	bool "Enable AMD IOMMU internals in DebugFS"
368c2ecf20Sopenharmony_ci	depends on AMD_IOMMU && IOMMU_DEBUGFS
378c2ecf20Sopenharmony_ci	help
388c2ecf20Sopenharmony_ci	  !!!WARNING!!!  !!!WARNING!!!  !!!WARNING!!!  !!!WARNING!!!
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci	  DO NOT ENABLE THIS OPTION UNLESS YOU REALLY, -REALLY- KNOW WHAT YOU ARE DOING!!!
418c2ecf20Sopenharmony_ci	  Exposes AMD IOMMU device internals in DebugFS.
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci	  This option is -NOT- intended for production environments, and should
448c2ecf20Sopenharmony_ci	  not generally be enabled.
45