Page MenuHomeFreeBSD

pci_cfgreg: Add a PCI domain argument to the low-level register API
ClosedPublic

Authored by jhb on Nov 28 2023, 11:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 8 2025, 2:31 AM
Unknown Object (File)
Dec 1 2025, 8:55 AM
Unknown Object (File)
Nov 13 2025, 12:52 PM
Unknown Object (File)
Nov 13 2025, 12:51 PM
Unknown Object (File)
Nov 7 2025, 1:34 AM
Unknown Object (File)
Nov 4 2025, 11:33 PM
Unknown Object (File)
Nov 4 2025, 11:31 PM
Unknown Object (File)
Nov 4 2025, 11:31 PM

Details

Summary

This commit changes the API of pci_cfgreg(read|write) to add a domain
argument (referred to as a segment in ACPI parlance) (note that this
is not the same as a NUMA domain, but something PCI-specific). This
does not yet enable access to domains other than 0, but updates the
API to support domains.

Places that use hard-coded bus/slot/function addresses have been
updated to hardcode a domain of 0. A few places that have the PCI
domain (segment) available such as the acpi_pcib_acpi.c Host-PCI
bridge driver pass the PCI domain.

The hpt27xx(4) and hptnr(4) drivers fail to attach to a device not on
domain 0 since they provide APIs to their binary blobs that only
permit bus/slot/function addressing.

The x86 non-ACPI PCI bus drivers all hardcode a domain of 0 as they
do not support multiple domains.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 54682
Build 51571: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Nov 28 2023, 11:34 PM