Skip to content
Commit 745ef109 authored by Janne Grunau's avatar Janne Grunau Committed by Joerg Roedel
Browse files

iommu/io-pgtable: Move Apple DART support to its own file



The pte format used by the DARTs found in the Apple M1 (t8103) is not
fully compatible with io-pgtable-arm. The 24 MSB are used for subpage
protection (mapping only parts of page) and conflict with the address
mask. In addition bit 1 is not available for tagging entries but disables
subpage protection. Subpage protection could be useful to support a CPU
granule of 4k with the fixed IOMMU page size of 16k.

The DARTs found on Apple M1 Pro/Max/Ultra use another different pte
format which is even less compatible. To support an output address size
of 42 bit the address is shifted down by 4. Subpage protection is
mandatory and bit 1 signifies uncached mappings used by the display
controller.

It would be advantageous to share code for all known Apple DART
variants to support common features. The page table allocator for DARTs
is less complex since it uses a two levels of translation table without
support for huge pages.

Signed-off-by: default avatarJanne Grunau <j@jannau.net>
Acked-by: default avatarRobin Murphy <robin.murphy@arm.com>
Acked-by: default avatarSven Peter <sven@svenpeter.dev>
Acked-by: default avatarHector Martin <marcan@marcan.st>
Link: https://lore.kernel.org/r/20220916094152.87137-3-j@jannau.net
[ joro: Fix compile warning in __dart_alloc_pages()]
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 7e18e42e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment