We need to map a PCI Requester ID (RID) to an IOMMU ID and get associated IOMMU specifier (reference).
There are several PCI bridges between a peripheral device that proceeds IOMMU and its PCI controller device, so we need a PCI interface method.
The bus has to propagate our request to the parent until it reaches the PCI controller that contains "iommu-map" and "iommu-map-mask" properties in its DTS node and maps RID to SID for us.
Details
Details
- Reviewers
jhb andrew - Group Reviewers
PCI - Commits
- rGb7672a70256b: Add OFW_IOMMU id type for pci_get_id() so we can ask parent IOMMU
This was tested and works well on ARM SMMUv3.2.
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Thanks for adding a new ID rather than a new method.
sys/dev/pci/pci_if.m | ||
---|---|---|
62 | I would maybe call this PCI_ID_OFW_IOMMU or PCI_ID_FDT_IOMMU as it may not be applicable to IOMMUs on other platforms. | |
sys/dev/pci/pcivar.h | ||
130 | I would rename this to match the constant (either pci_id_ofw_iommu or pci_id_fdt_iommu) |