Page MenuHomeFreeBSD

Parse named nodes from IORT ACPI on arm64
ClosedPublic

Authored by dsl on Jul 22 2021, 9:05 AM.
Tags
None
Referenced Files
F82026366: D31267.diff
Wed, Apr 24, 5:44 PM
Unknown Object (File)
Tue, Apr 23, 3:14 PM
Unknown Object (File)
Mon, Apr 1, 2:57 AM
Unknown Object (File)
Jan 31 2024, 6:40 PM
Unknown Object (File)
Jan 13 2024, 12:31 AM
Unknown Object (File)
Jan 11 2024, 6:44 PM
Unknown Object (File)
Dec 25 2023, 5:33 AM
Unknown Object (File)
Dec 24 2023, 3:02 PM

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
Tests Skipped

Event Timeline

dsl requested review of this revision.Jul 22 2021, 9:05 AM
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.

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.

This revision is now accepted and ready to land.Aug 6 2021, 10:08 AM