Skip to content

Commit 46d1fb0

Browse files
svenpeter42joergroedel
authored andcommitted
iommu/dart: Add DART iommu driver
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. Tested-by: Alyssa Rosenzweig <[email protected]> Signed-off-by: Sven Peter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 9d9cafb commit 46d1fb0

File tree

4 files changed

+939
-0
lines changed

4 files changed

+939
-0
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,7 @@ M: Sven Peter <[email protected]>
12671267
12681268
S: Maintained
12691269
F: Documentation/devicetree/bindings/iommu/apple,dart.yaml
1270+
F: drivers/iommu/apple-dart.c
12701271

12711272
APPLE SMC DRIVER
12721273
M: Henrik Rydberg <[email protected]>

drivers/iommu/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,20 @@ config SPAPR_TCE_IOMMU
290290
Enables bits of IOMMU API required by VFIO. The iommu_ops
291291
is not implemented as it is not necessary for VFIO.
292292

293+
config APPLE_DART
294+
tristate "Apple DART IOMMU Support"
295+
depends on ARM64 || (COMPILE_TEST && !GENERIC_ATOMIC64)
296+
select IOMMU_API
297+
select IOMMU_IO_PGTABLE_LPAE
298+
default ARCH_APPLE
299+
help
300+
Support for Apple DART (Device Address Resolution Table) IOMMUs
301+
found in Apple ARM SoCs like the M1.
302+
This IOMMU is required for most peripherals using DMA to access
303+
the main memory.
304+
305+
Say Y here if you are using an Apple SoC.
306+
293307
# ARM IOMMU support
294308
config ARM_SMMU
295309
tristate "ARM Ltd. System MMU (SMMU) Support"

drivers/iommu/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ obj-$(CONFIG_HYPERV_IOMMU) += hyperv-iommu.o
2929
obj-$(CONFIG_VIRTIO_IOMMU) += virtio-iommu.o
3030
obj-$(CONFIG_IOMMU_SVA_LIB) += iommu-sva-lib.o io-pgfault.o
3131
obj-$(CONFIG_SPRD_IOMMU) += sprd-iommu.o
32+
obj-$(CONFIG_APPLE_DART) += apple-dart.o

0 commit comments

Comments
 (0)