Page MenuHomeFreeBSD

pci: Ignore PCRx devices resources
ClosedPublic

Authored by andrew on Apr 8 2025, 11:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 14, 4:44 AM
Unknown Object (File)
Mon, Oct 13, 3:15 AM
Unknown Object (File)
Fri, Oct 3, 4:39 PM
Unknown Object (File)
Tue, Sep 30, 2:41 PM
Unknown Object (File)
Fri, Sep 26, 5:24 AM
Unknown Object (File)
Thu, Sep 25, 8:40 PM
Unknown Object (File)
Thu, Sep 25, 7:12 PM
Unknown Object (File)
Thu, Sep 25, 4:41 PM
Subscribers

Details

Summary

Some systems provide two PCI root complex devices in the ACPI tables.
Allow us to skip known pci-like devices even if they aren't detected
as a PCI root complex.

Co-authored-by: cognet

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Apr 8 2025, 11:41 AM
sys/dev/acpica/acpi_resource.c
649

Note that this case is for x86 truly is for PCI bridges only. If this device isn't a PCI bridge, I think I'd rather just have a separate quirk, so something like:

/* existing comment and code for PCI-bridges */

/*
  * Ignore memory resources for devices known to list invalid resources.
  */
if (type == SYS_RES_MEMORY && ACPI_ID_PROBE(...) <= 0)
    return (true);

I would also just rename pcilike_ids to bad_memresource_ids or some such in this case.

Is the device in question duplicating the full memory decoded ranges of the PCI bridge, or is it just listing resource that are a subset but conflict with the bridge? (It might be nice to see the resource ranges used by the device in question and the PCI bridge)

Update based on feedback from @jhb

This revision now requires review to proceed.May 8 2025, 9:59 AM
jhb added inline comments.
sys/dev/acpica/acpi_resource.c
71–72

Maybe tweak this description a bit to be "Devices with invalid memory resources" and expand the comment for this specific ID to say it conflicts with the PCI resource range?

This revision is now accepted and ready to land.May 8 2025, 6:30 PM
This revision was automatically updated to reflect the committed changes.