Page MenuHomeFreeBSD

Add helper methods for PCI-e register access.
ClosedPublic

Authored by jhb on Nov 5 2015, 8:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 19 2024, 4:38 PM
Unknown Object (File)
Mar 19 2024, 2:40 PM
Unknown Object (File)
Feb 4 2024, 1:57 PM
Unknown Object (File)
Jan 6 2024, 1:45 PM
Unknown Object (File)
Dec 20 2023, 2:49 AM
Unknown Object (File)
Nov 7 2023, 10:03 PM
Unknown Object (File)
Nov 7 2023, 1:22 AM
Unknown Object (File)
Nov 1 2023, 8:40 PM
Subscribers
None

Details

Summary

Add helper routines for PCI device drivers to read, write, and modify
PCI-Express capability registers (that is, PCI config registers in the
standard PCI config space belonging to the PCI-Express capability
register set).

Note that all of the current PCI-e registers are either 16 or 32-bits,
so only widths of 2 or 4 bytes are supported.

Also, there is not an existing pci_adjust_config() similar to
pcie_adjust_config(). I could add that in a separate commit if it
would be useful.

Test Plan
  • I use these in a pending change to cxgbe(4), however these are generally useful. We can probably remove some duplicated code in various drivers that uses pci_find_cap() followed by raw pci_read/write_config.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb retitled this revision from to Add helper methods for PCI-e register access..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added a reviewer: imp.

This looks fine to me.

This revision was automatically updated to reflect the committed changes.