ARM System MMU v3.2 support.
Hardware overview is provided in the header of smmu.c.
Documentation is available here:
https://static.docs.arm.com/ihi0070/ca/IHI_0070_C_a_System_Memory_Management_Unit_Arm_Architecture_Specification.pdf
Paths
| Differential D24618 Authored by br on Apr 29 2020, 4:05 PM.
Tags None Referenced Files
Details Summary ARM System MMU v3.2 support. Hardware overview is provided in the header of smmu.c. Documentation is available here: Test Plan Tested on ARM Neoverse N1 SDP board.
Diff Detail
Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes
Comment Actions I’m slightly confused by code partitioning.
Comment Actions
iommu.c is a glue between generic iommu framework (dev/iommu) and smmu driver (we have multiple instances of SMMU in the system). We could probably reuse the glue for other arm64 IOMMU systems (at least smmuv2), but not sure about others. (sorry for long reply I missed your comments)
Comment Actions a change by andrew@: Manage MSI IOMMU pages when allocating their irq This allows the interrupt controller driver only need a small change to create a map for the page the device will write to to raise an interrupt. br added a child revision: D26877: SMMU pmap routines added.Oct 30 2020, 12:20 PM2020-10-30 12:20:44 (UTC+0) Comment Actions I’m looking at this from perspective of presence of multiple different implementations of IOMMUs in ARM(64) world. From this point of view, I still have some problems with code partitioning, mainly in meaning of smmu_if.m. I think that this not that hard change, 95% of code is already done. I, of course, don’t want to block you, I only think that some system interface should be prepared in forward. Comment Actions Rework the arm64 iommu interface so it could be used on other IOMMU engines in arm64 world, not only SMMU. Comment Actions In any case, with these minor issues fixed, LGTM
This revision is now accepted and ready to land.Nov 15 2020, 10:22 AM2020-11-15 10:22:18 (UTC+0) This revision now requires review to proceed.Nov 16 2020, 12:03 AM2020-11-16 00:03:03 (UTC+0) Comment Actions More style fixes: struct smmu_unit is unit struct smmu_domain is domain struct smmu_ctx is ctx struct iommu_unit is iommu struct iommu_domain is iodom struct iommu_ctx is ioctx o Add locking around smmu_ctx_lookup() method This revision was not accepted when it landed; it landed in state Needs Review.Nov 16 2020, 9:56 PM2020-11-16 21:56:15 (UTC+0) Closed by commit rS367736: Introduce IOMMU support for arm64 platform. (authored by br). · Explain Why This revision was automatically updated to reflect the committed changes. Herald added a subscriber: imp. · View Herald TranscriptNov 16 2020, 9:56 PM2020-11-16 21:56:16 (UTC+0)
Revision Contents
Diff 75498 sys/arm64/arm64/pmap.c
sys/arm64/include/bus_dma_impl.h
sys/arm64/include/pmap.h
sys/arm64/iommu/iommu.h
sys/arm64/iommu/iommu.c
sys/arm64/iommu/iommu_if.m
sys/arm64/iommu/smmu.c
sys/arm64/iommu/smmu_acpi.c
|