PCICTL(8) | System Manager's Manual | 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 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. The bus, device, and function numbers may be specified by flags. Any locator not specified defaults to a wildcard, or may be explicitly wildcarded by specifying “any”. If `-N` is given, the driver name for this PCI device will be listed if any driver is attached.

`dump` [`-b` bus] `-d` device [`-f` function]

Dump the PCI configuration space for the specified device located at the specified bus, device, and function. If the bus is not specified, it defaults to the bus number of the PCI bus specified on the command line. If the function is not specified, it defaults to 0.

`read` [`-b` bus] `-d` device [`-f` function] reg

Read the specified 32-bit aligned PCI configuration register and print it in hexadecimal to standard output. If the bus is not specified, it defaults to the bus number of the PCI bus specified on the command line. If the function is not specified, it defaults to 0.

WARNING: `pcictl` `read` is a dangerous command that can damage hardware and panic the operating system, even though it appears to be a harmless read-only operation. It is meant as a diagnostic tool for experiments or to debug device drivers. Do not use it as a substitute for a device driver!

`write` [`-b` bus] `-d` device [`-f` function] reg value

Write the specified value to the specified 32-bit aligned PCI configuration register. If the bus is not specified, it defaults to the bus number of the PCI bus specified on the command line. If the function is not specified, it defaults to 0.

WARNING: `pcictl` `write` is a dangerous command that can damage hardware and panic the operating system. It is meant as a diagnostic tool for experiments or to debug device drivers. Do not use it as a substitute for a device driver!

# 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.

September 23, 2016 | NetBSD 11.0