Page MenuHomeFreeBSD

arm64 acpi: Add support for IORT table
ClosedPublic

Authored by jchandra on Nov 16 2018, 5:48 AM.

Details

Summary

Add new file arm64/acpica/acpi_iort.c to support the "IO Remapping Table" (IORT). The table is specified in ARM document "ARM DEN 0049D" titled "IO Remapping Table Platform Design Document".

The IORT has information on the associations between PCI root complexes, SMMU blocks and GIC ITS blocks in the system.

The code added by the commit is to parse and save the information in the IORT table. It provides an API for the PCI controller to query the mapping of a specific child to a PIC XREF and a GIC device ID.

The acpi_iort.c has also code to check the GIC ITS nodes seen with MADT table for validity and with SRAT table to store the proximity information needed by ITS blocks.

Test Plan

qemu/kvm boot with EDK2
Further tests on Cavium ThunderX2

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jchandra marked an inline comment as done.

New version planned with correct way of walking IORT.

sys/arm64/acpica/acpi_iort.c
462 ↗(On Diff #50472)

This won't work, the IORT does not use subtable header - it has a different header with length field of 16 bits. This code does not fail when the length is less than 255 - so it did not show up in initial testing.

Will fix this.

Few fixes to earlier revision-

  • IORT table walking fixed (not to use acpi_walk_subtables since the header is slightly different)
  • proximity is changed to int, so that we can return -1 when SRAT does not have an entry.
  • return o copy data is changed to void since it returned only 0 - this simplified the code a bit.
This revision is now accepted and ready to land.Feb 4 2019, 5:25 PM
This revision was automatically updated to reflect the committed changes.