During my work on a driver for DPAA2 (NXP's network feature available in several of their SoCs) firmware bus, I discovered that it isn't possible to map a named component mentioned in IORT to its SMMU or ITS node in order to setup interrupts. It's possible to find a named node by its names (as a substring) and a resource ID (isolation context ID in case of DPAA2) similar to PCI nodes with this patch.
Details
- Clone my fork with DPAA2 work-in-progress from https://github.com/mcusim/freebsd-src.
- Build and boot to the kernel on SolidRun's HoneyComb board.
- Build and load KLD from sys/modules/dpaa2.
- Find "dpaa2_rc0: MSI allocated: irq=..." in dmesg
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
You won't see "MSI allocated" in dmesg if you clone the repository or pull the latest changes now. Please, ping me and I'll explain how to test this patch.
sys/arm64/acpica/acpi_iort.c | ||
---|---|---|
256 | How difficult would it be to merge this with iort_pci_rc_map? It looks like the only difference is the comparison in the loop. |
@andrew It definitely won't be, but I wanted to have a separate function for named components from IORT table similar to one for PCI RC nodes. I'll probably extract the same parts of the both functions into a separate one.
Shared parts of the iort_pci_rc_map() and iort_named_comp_map() were extracted into a separate iort_smmu_trymap() function.
outid will be written in case of a non-null output node found only. This is how iort_pci_rc_map() used to work and I don't want my patch to change this behavior.