Page MenuHomeFreeBSD

Parse named nodes from IORT ACPI on arm64
Needs ReviewPublic

Authored by dsl_mcusim.org on Thu, Jul 22, 9:05 AM.

Details

Reviewers
manu
andrew
Group Reviewers
ARM
Summary

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.

Test Plan
  1. Clone my fork with DPAA2 work-in-progress from https://github.com/mcusim/freebsd-src.
  2. Build and boot to the kernel on SolidRun's HoneyComb board.
  3. Build and load KLD from sys/modules/dpaa2.
  4. Find "dpaa2_rc0: MSI allocated: irq=..." in dmesg

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

bz added a subscriber: bz.

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
219

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.