PCICTL(8)

NAME
pcictl - a program to manipulate the PCI bus

SYNOPSIS
pcictl pcibus command [arg ...]

DESCRIPTION
pcictl allows a user or system administrator to access various resources on a PCI bus. The pcibus argument names a special file for the PCI bus device. If the file name is relative, it's interpreted relative to the /dev directory, so e.g. plain ‘pci0’ refers to /dev/pci0.

The following commands are available:

    list [-Nn] [-b bus] [-d device] [-f function] List the devices in the PCI domain, either as names or, if -n is given, as numbers.

    If -N is given, the driver name for this PCI device will be listed if any driver is attached.

    Any locator not specified defaults to a wildcard, or may be explicitly wildcarded by specifying ‘all’, or ‘any’.

The remaining commands operate on a single PCI device, the -d argument is mandatory. If the bus is not specified, it defaults to the bus number of the pcibus. If the function is not specified, it defaults to 0.

    dump [-b bus] -d device [-f function] Dump the PCI configuration space for the specified device.

    read [-b bus] -d device [-f function] register Read the specified 32-bit aligned PCI configuration register and print it in hexadecimal to standard output.

    write [-b bus] -d device [-f function] register value Write the specified value to the specified 32-bit aligned PCI configuration register.

FILES

/dev/pci*
    PCI bus device nodes

EXAMPLES
This shows all PCI devices on the system:

    pcictl pci0 list

This shows all PCI devices on the system, including attached drivers:

    pcictl pci0 list -N

SEE ALSO
pci(3), pci(4), drvctl(8)

HISTORY
The pcictl command first appeared in NetBSD 1.6.

CAVEATS
pcictl read and write are dangerous commands that can damage hardware and panic the operating system. They are meant as a diagnostic tool for experiments or to debug device drivers. Do not use them as substitutes for a device driver!