Skip to content

Commit e5fc975

Browse files
rmurphy-armwildea01
authored andcommitted
iommu/io-pgtable: Add ARMv7 short descriptor support
Add a nearly-complete ARMv7 short descriptor implementation, omitting only a few legacy and CPU-centric aspects which shouldn't be necessary for IOMMU API use anyway. Reviewed-by: Yong Wu <yong.wu@mediatek.com> Tested-by: Yong Wu <yong.wu@mediatek.com> Signed-off-by: Yong Wu <yong.wu@mediatek.com> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent 18558ca commit e5fc975

File tree

5 files changed

+885
-1
lines changed

5 files changed

+885
-1
lines changed

drivers/iommu/Kconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,25 @@ config IOMMU_IO_PGTABLE_LPAE_SELFTEST
3939

4040
If unsure, say N here.
4141

42+
config IOMMU_IO_PGTABLE_ARMV7S
43+
bool "ARMv7/v8 Short Descriptor Format"
44+
select IOMMU_IO_PGTABLE
45+
depends on HAS_DMA && (ARM || ARM64 || COMPILE_TEST)
46+
help
47+
Enable support for the ARM Short-descriptor pagetable format.
48+
This supports 32-bit virtual and physical addresses mapped using
49+
2-level tables with 4KB pages/1MB sections, and contiguous entries
50+
for 64KB pages/16MB supersections if indicated by the IOMMU driver.
51+
52+
config IOMMU_IO_PGTABLE_ARMV7S_SELFTEST
53+
bool "ARMv7s selftests"
54+
depends on IOMMU_IO_PGTABLE_ARMV7S
55+
help
56+
Enable self-tests for ARMv7s page table allocator. This performs
57+
a series of page-table consistency checks during boot.
58+
59+
If unsure, say N here.
60+
4261
endmenu
4362

4463
config IOMMU_IOVA

drivers/iommu/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ obj-$(CONFIG_IOMMU_API) += iommu-traces.o
33
obj-$(CONFIG_IOMMU_API) += iommu-sysfs.o
44
obj-$(CONFIG_IOMMU_DMA) += dma-iommu.o
55
obj-$(CONFIG_IOMMU_IO_PGTABLE) += io-pgtable.o
6+
obj-$(CONFIG_IOMMU_IO_PGTABLE_ARMV7S) += io-pgtable-arm-v7s.o
67
obj-$(CONFIG_IOMMU_IO_PGTABLE_LPAE) += io-pgtable-arm.o
78
obj-$(CONFIG_IOMMU_IOVA) += iova.o
89
obj-$(CONFIG_OF_IOMMU) += of_iommu.o

0 commit comments

Comments
 (0)