Add smmu(4), a driver the ARM System MMU. This IOMMU is basically a
authorpatrick <patrick@openbsd.org>
Sun, 28 Feb 2021 21:39:31 +0000 (21:39 +0000)
committerpatrick <patrick@openbsd.org>
Sun, 28 Feb 2021 21:39:31 +0000 (21:39 +0000)
commit1a30e4e7f5b65e3b295cc620ac7b40fb01045e5f
treee195143c8fa08d8bfe0afb4b78a5479a4f4754ba
parentffdeadb517b142331b770fc2004b6e192e61ba55
Add smmu(4), a driver the ARM System MMU.  This IOMMU is basically a
regular ARM CPU MMU re-used for I/O devices.  Implementations can have a
mix of stage-2 only and stage-2/stage-2 context blocks (domains).  The
IOMMU allows different ways of grouping devices into a single domain.

This implementation only supports SMMUv2, since there is basically
no relevant SMMUv1 hardware.  It also only supports AArch64
pagetables, the same as our pmap.  Hence lots of code was taken from
there.  There is no support for 32-bit pagetables, which would have
also been needed for SMMUv1 support.  I have not yet seen any
machines with SMMUv3, which will probably need a new driver.

There is some work to be done, but the code works and it's about
time it hits the tree.

ok kettenis@
sys/arch/arm64/dev/smmu.c [new file with mode: 0644]
sys/arch/arm64/dev/smmu_acpi.c [new file with mode: 0644]
sys/arch/arm64/dev/smmu_fdt.c [new file with mode: 0644]
sys/arch/arm64/dev/smmureg.h [new file with mode: 0644]
sys/arch/arm64/dev/smmuvar.h [new file with mode: 0644]