Skip to content

Commit

Permalink
iommu: dart: Add DART iommu driver
Browse files Browse the repository at this point in the history
Apple's new SoCs use iommus for almost all peripherals. These Device
Address Resolution Tables must be setup before these peripherals can
act as DMA masters.

Signed-off-by: Sven Peter <sven@svenpeter.dev>
  • Loading branch information
svenpeter42 authored and intel-lab-lkp committed Mar 28, 2021
1 parent b14cbc1 commit ecad602
Show file tree
Hide file tree
Showing 4 changed files with 874 additions and 0 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Expand Up @@ -1241,6 +1241,7 @@ M: Sven Peter <sven@svenpeter.dev>
L: iommu@lists.linux-foundation.org
S: Maintained
F: Documentation/devicetree/bindings/iommu/apple,t8103-dart.yaml
F: drivers/iommu/apple-dart-iommu.c

APPLE SMC DRIVER
M: Henrik Rydberg <rydberg@bitmath.org>
Expand Down
14 changes: 14 additions & 0 deletions drivers/iommu/Kconfig
Expand Up @@ -249,6 +249,20 @@ config SPAPR_TCE_IOMMU
Enables bits of IOMMU API required by VFIO. The iommu_ops
is not implemented as it is not necessary for VFIO.

config IOMMU_APPLE_DART
tristate "Apple DART IOMMU Support"
depends on ARM64 || (COMPILE_TEST && !GENERIC_ATOMIC64)
select IOMMU_API
select IOMMU_IO_PGTABLE
select IOMMU_IO_PGTABLE_LPAE
help
Support for Apple DART (Device Address Resolution Table) IOMMUs
found in Apple ARM SoCs like the M1.
This IOMMU is required for most peripherals using DMA to access
the main memory.

Say Y here if you are using an Apple SoC with a DART IOMMU.

# ARM IOMMU support
config ARM_SMMU
tristate "ARM Ltd. System MMU (SMMU) Support"
Expand Down
1 change: 1 addition & 0 deletions drivers/iommu/Makefile
Expand Up @@ -28,3 +28,4 @@ obj-$(CONFIG_S390_IOMMU) += s390-iommu.o
obj-$(CONFIG_HYPERV_IOMMU) += hyperv-iommu.o
obj-$(CONFIG_VIRTIO_IOMMU) += virtio-iommu.o
obj-$(CONFIG_IOMMU_SVA_LIB) += iommu-sva-lib.o
obj-$(CONFIG_IOMMU_APPLE_DART) += apple-dart-iommu.o

0 comments on commit ecad602

Please sign in to comment.