#pci #bus #configuration #access #devices #port #system

bin+lib pcitool

Tool and library for portable access to PCI bus configuration registres

1 unstable release

0.1.0 Jan 9, 2024

#972 in Hardware support

MIT license

365KB
9K SLoC

Contains (ELF exe/lib, 165KB) tests/bin/lspci-musl

pcitool

This package provides tool and library for portable access to PCI bus configuration registres.

Following systems are supported:

  • Linux
  • FreeBSD (via /dev/pci)
  • NetBSD (via libpci)
  • OpenBSD (via /dev/pci)
  • GNU/kFreeBSD (via /dev/pci)
  • Solaris/i386 (direct port access)
  • Aix (via /dev/pci and odmget)
  • GNU Hurd (direct port access)
  • Windows (via cfgmgr32 or direct port access, see README.Windows for caveats)
  • CYGWIN (direct port access)
  • BeOS (via syscalls)
  • Haiku (via /dev/misc/poke)
  • Darwin (via IOKit)
  • DOS/DJGPP (via i386 ports)
  • SylixOS (via /proc/pci)

Pcitool inspired by pciutils and tries to be compatible in every way

Usage

List all PCI devices

  • Brief: pcitool ls
  • Verbose view: pcitool ls -v
  • Show PCI vendor and device codes as both numbers and names: pcitool ls -nn

Configure PCI device

TODO

Dependencies

~2.4–10MB
~106K SLoC