diff options
author | Janne Grunau <j@jannau.net> | 2022-09-16 11:41:49 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2022-09-26 13:48:40 +0200 |
commit | 745ef1092bcfcf3bca8d82c260947ca498022dde (patch) | |
tree | 31439b0721b0bc291d1c89ef783e66bfd8e8e624 /drivers/iommu/apple-dart.c | |
parent | 7e18e42e4b280c85b76967a9106a13ca61c16179 (diff) |
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: Janne Grunau <j@jannau.net>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Sven Peter <sven@svenpeter.dev>
Acked-by: Hector 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: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/apple-dart.c')
0 files changed, 0 insertions, 0 deletions