1*0da188c8SRobin Murphy# SPDX-License-Identifier: GPL-2.0-only 2*0da188c8SRobin Murphy# ARM IOMMU support 3*0da188c8SRobin Murphyconfig ARM_SMMU 4*0da188c8SRobin Murphy tristate "ARM Ltd. System MMU (SMMU) Support" 5*0da188c8SRobin Murphy depends on ARM64 || ARM || COMPILE_TEST 6*0da188c8SRobin Murphy depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE 7*0da188c8SRobin Murphy select IOMMU_API 8*0da188c8SRobin Murphy select IOMMU_IO_PGTABLE_LPAE 9*0da188c8SRobin Murphy select ARM_DMA_USE_IOMMU if ARM 10*0da188c8SRobin Murphy help 11*0da188c8SRobin Murphy Support for implementations of the ARM System MMU architecture 12*0da188c8SRobin Murphy versions 1 and 2. 13*0da188c8SRobin Murphy 14*0da188c8SRobin Murphy Say Y here if your SoC includes an IOMMU device implementing 15*0da188c8SRobin Murphy the ARM SMMU architecture. 16*0da188c8SRobin Murphy 17*0da188c8SRobin Murphyif ARM_SMMU 18*0da188c8SRobin Murphyconfig ARM_SMMU_LEGACY_DT_BINDINGS 19*0da188c8SRobin Murphy bool "Support the legacy \"mmu-masters\" devicetree bindings" 20*0da188c8SRobin Murphy depends on ARM_SMMU=y && OF 21*0da188c8SRobin Murphy help 22*0da188c8SRobin Murphy Support for the badly designed and deprecated "mmu-masters" 23*0da188c8SRobin Murphy devicetree bindings. This allows some DMA masters to attach 24*0da188c8SRobin Murphy to the SMMU but does not provide any support via the DMA API. 25*0da188c8SRobin Murphy If you're lucky, you might be able to get VFIO up and running. 26*0da188c8SRobin Murphy 27*0da188c8SRobin Murphy If you say Y here then you'll make me very sad. Instead, say N 28*0da188c8SRobin Murphy and move your firmware to the utopian future that was 2016. 29*0da188c8SRobin Murphy 30*0da188c8SRobin Murphyconfig ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT 31*0da188c8SRobin Murphy bool "Disable unmatched stream bypass by default" if EXPERT 32*0da188c8SRobin Murphy default y 33*0da188c8SRobin Murphy help 34*0da188c8SRobin Murphy If your firmware is broken and fails to describe StreamIDs which 35*0da188c8SRobin Murphy Linux should know about in order to manage the SMMU correctly and 36*0da188c8SRobin Murphy securely, and you don't want to boot with the 'arm-smmu.disable_bypass=0' 37*0da188c8SRobin Murphy command line parameter, then as a last resort you can turn it off 38*0da188c8SRobin Murphy by default here. But don't. This option may be removed at any time. 39*0da188c8SRobin Murphy 40*0da188c8SRobin Murphy Note that 'arm-smmu.disable_bypass=1' will still take precedence. 41*0da188c8SRobin Murphy 42*0da188c8SRobin Murphyconfig ARM_SMMU_MMU_500_CPRE_ERRATA 43*0da188c8SRobin Murphy bool "Enable errata workaround for CPRE in SMMU reset path" 44*0da188c8SRobin Murphy default y 45*0da188c8SRobin Murphy help 46*0da188c8SRobin Murphy Say Y here (by default) to apply workaround to disable 47*0da188c8SRobin Murphy MMU-500's next-page prefetcher for sake of 4 known errata. 48*0da188c8SRobin Murphy 49*0da188c8SRobin Murphy Say N here only when it is sure that any errata related to 50*0da188c8SRobin Murphy prefetch enablement are not applicable on the platform. 51*0da188c8SRobin Murphy Refer silicon-errata.rst for info on errata IDs. 52*0da188c8SRobin Murphy 53*0da188c8SRobin Murphyconfig ARM_SMMU_QCOM 54*0da188c8SRobin Murphy def_tristate y 55*0da188c8SRobin Murphy depends on ARCH_QCOM 56*0da188c8SRobin Murphy select QCOM_SCM 57*0da188c8SRobin Murphy help 58*0da188c8SRobin Murphy When running on a Qualcomm platform that has the custom variant 59*0da188c8SRobin Murphy of the ARM SMMU, this needs to be built into the SMMU driver. 60*0da188c8SRobin Murphy 61*0da188c8SRobin Murphyconfig ARM_SMMU_QCOM_DEBUG 62*0da188c8SRobin Murphy bool "ARM SMMU QCOM implementation defined debug support" 63*0da188c8SRobin Murphy depends on ARM_SMMU_QCOM=y 64*0da188c8SRobin Murphy help 65*0da188c8SRobin Murphy Support for implementation specific debug features in ARM SMMU 66*0da188c8SRobin Murphy hardware found in QTI platforms. This include support for 67*0da188c8SRobin Murphy the Translation Buffer Units (TBU) that can be used to obtain 68*0da188c8SRobin Murphy additional information when debugging memory management issues 69*0da188c8SRobin Murphy like context faults. 70*0da188c8SRobin Murphy 71*0da188c8SRobin Murphy Say Y here to enable debug for issues such as context faults 72*0da188c8SRobin Murphy or TLB sync timeouts which requires implementation defined 73*0da188c8SRobin Murphy register dumps. 74*0da188c8SRobin Murphyendif 75*0da188c8SRobin Murphy 76*0da188c8SRobin Murphyconfig ARM_SMMU_V3 77*0da188c8SRobin Murphy tristate "ARM Ltd. System MMU Version 3 (SMMUv3) Support" 78*0da188c8SRobin Murphy depends on ARM64 79*0da188c8SRobin Murphy select IOMMU_API 80*0da188c8SRobin Murphy select IOMMU_IO_PGTABLE_LPAE 81*0da188c8SRobin Murphy select GENERIC_MSI_IRQ 82*0da188c8SRobin Murphy select IOMMUFD_DRIVER if IOMMUFD 83*0da188c8SRobin Murphy help 84*0da188c8SRobin Murphy Support for implementations of the ARM System MMU architecture 85*0da188c8SRobin Murphy version 3 providing translation support to a PCIe root complex. 86*0da188c8SRobin Murphy 87*0da188c8SRobin Murphy Say Y here if your system includes an IOMMU device implementing 88*0da188c8SRobin Murphy the ARM SMMUv3 architecture. 89*0da188c8SRobin Murphy 90*0da188c8SRobin Murphyif ARM_SMMU_V3 91*0da188c8SRobin Murphyconfig ARM_SMMU_V3_SVA 92*0da188c8SRobin Murphy bool "Shared Virtual Addressing support for the ARM SMMUv3" 93*0da188c8SRobin Murphy select IOMMU_SVA 94*0da188c8SRobin Murphy select IOMMU_IOPF 95*0da188c8SRobin Murphy select MMU_NOTIFIER 96*0da188c8SRobin Murphy help 97*0da188c8SRobin Murphy Support for sharing process address spaces with devices using the 98*0da188c8SRobin Murphy SMMUv3. 99*0da188c8SRobin Murphy 100*0da188c8SRobin Murphy Say Y here if your system supports SVA extensions such as PCIe PASID 101*0da188c8SRobin Murphy and PRI. 102*0da188c8SRobin Murphy 103*0da188c8SRobin Murphyconfig ARM_SMMU_V3_IOMMUFD 104*0da188c8SRobin Murphy bool "Enable IOMMUFD features for ARM SMMUv3 (EXPERIMENTAL)" 105*0da188c8SRobin Murphy depends on IOMMUFD 106*0da188c8SRobin Murphy help 107*0da188c8SRobin Murphy Support for IOMMUFD features intended to support virtual machines 108*0da188c8SRobin Murphy with accelerated virtual IOMMUs. 109*0da188c8SRobin Murphy 110*0da188c8SRobin Murphy Say Y here if you are doing development and testing on this feature. 111*0da188c8SRobin Murphy 112*0da188c8SRobin Murphyconfig ARM_SMMU_V3_KUNIT_TEST 113*0da188c8SRobin Murphy tristate "KUnit tests for arm-smmu-v3 driver" if !KUNIT_ALL_TESTS 114*0da188c8SRobin Murphy depends on KUNIT 115*0da188c8SRobin Murphy depends on ARM_SMMU_V3_SVA 116*0da188c8SRobin Murphy default KUNIT_ALL_TESTS 117*0da188c8SRobin Murphy help 118*0da188c8SRobin Murphy Enable this option to unit-test arm-smmu-v3 driver functions. 119*0da188c8SRobin Murphy 120*0da188c8SRobin Murphy If unsure, say N. 121*0da188c8SRobin Murphy 122*0da188c8SRobin Murphyconfig TEGRA241_CMDQV 123*0da188c8SRobin Murphy bool "NVIDIA Tegra241 CMDQ-V extension support for ARM SMMUv3" 124*0da188c8SRobin Murphy depends on ACPI 125*0da188c8SRobin Murphy help 126*0da188c8SRobin Murphy Support for NVIDIA CMDQ-Virtualization extension for ARM SMMUv3. The 127*0da188c8SRobin Murphy CMDQ-V extension is similar to v3.3 ECMDQ for multi command queues 128*0da188c8SRobin Murphy support, except with virtualization capabilities. 129*0da188c8SRobin Murphy 130*0da188c8SRobin Murphy Say Y here if your system is NVIDIA Tegra241 (Grace) or it has the same 131*0da188c8SRobin Murphy CMDQ-V extension. 132*0da188c8SRobin Murphyendif 133*0da188c8SRobin Murphy 134*0da188c8SRobin Murphyconfig QCOM_IOMMU 135*0da188c8SRobin Murphy # Note: iommu drivers cannot (yet?) be built as modules 136*0da188c8SRobin Murphy bool "Qualcomm IOMMU Support" 137*0da188c8SRobin Murphy depends on ARCH_QCOM || COMPILE_TEST 138*0da188c8SRobin Murphy depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE 139*0da188c8SRobin Murphy select QCOM_SCM 140*0da188c8SRobin Murphy select IOMMU_API 141*0da188c8SRobin Murphy select IOMMU_IO_PGTABLE_LPAE 142*0da188c8SRobin Murphy select ARM_DMA_USE_IOMMU 143*0da188c8SRobin Murphy help 144*0da188c8SRobin Murphy Support for IOMMU on certain Qualcomm SoCs. 145