Page MenuHomeFreeBSD

arm64 acpi: Add support for IORT table
ClosedPublic

Authored by jchandra on Nov 16 2018, 5:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 2, 12:07 PM
Unknown Object (File)
Mar 5 2024, 11:43 PM
Unknown Object (File)
Feb 18 2024, 3:33 AM
Unknown Object (File)
Jan 17 2024, 2:17 AM
Unknown Object (File)
Jan 12 2024, 2:46 AM
Unknown Object (File)
Dec 21 2023, 2:34 PM
Unknown Object (File)
Dec 19 2023, 11:45 PM
Unknown Object (File)
Dec 18 2023, 12:51 PM
Subscribers

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
Lint Not Applicable
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.