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
Unknown Object (File)
Fri, Dec 13, 4:24 AM
Unknown Object (File)
Wed, Dec 4, 1:58 AM
Unknown Object (File)
Nov 17 2024, 12:19 PM
Unknown Object (File)
Nov 11 2024, 1:47 AM
Unknown Object (File)
Nov 2 2024, 3:51 PM
Unknown Object (File)
Oct 18 2024, 4:26 AM
Unknown Object (File)
Oct 6 2024, 6:52 AM
Unknown Object (File)
Oct 4 2024, 8:11 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
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.

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