pcidump
Display PCI device configuration information
SYNOPSIS
pcidump [-d
PARAMETERS
-d
Only dump information for the specified vendor and device IDs in hexadecimal format (e.g., -d 8086:10d3). This helps filter the output to focus on a particular device.
-v
Verbose mode. Provides more detailed output and displays additional information.
-q
Quiet mode. Suppresses informational messages.
-n
Display PCI device names instead of numerical IDs. This requires a name database. Usually relies on pci.ids.
-x
Dump the PCI configuration space in hexadecimal format.
-s
Dump the PCI configuration space for the specified slot in the format
DESCRIPTION
The `pcidump` command is a utility in Linux used to display the contents of the PCI configuration space for each PCI device detected in the system. The PCI configuration space contains vital information about the device, including its vendor ID, device ID, class code, memory mappings, interrupt settings, and other device-specific control registers. This detailed information is crucial for hardware debugging, driver development, and system analysis.
By examining the configuration space, developers and administrators can identify the capabilities of installed PCI devices, troubleshoot hardware conflicts, verify proper device initialization, and understand how devices are interacting with the system. This command often requires root privileges to access the hardware directly. The output is typically in hexadecimal format, allowing a low-level view of the PCI device's registers. pcidump uses direct hardware access or the /proc/bus/pci interface to read the information.
CAVEATS
Requires root privileges for direct hardware access. The specific format of the PCI configuration space is device-dependent and defined by the PCI specification. The availability and behavior might vary slightly depending on the system configuration and kernel version. Output can be very verbose.
OUTPUT INTERPRETATION
The hexadecimal output of `pcidump` represents the raw bytes in the PCI configuration registers. To understand the meaning of specific bytes, you must consult the PCI device's datasheet or the PCI specification. Common registers include Vendor ID, Device ID, Command Register, Status Register, Class Code, and Base Address Registers (BARs).
The Vendor ID and Device ID uniquely identify the manufacturer and model of the PCI device. The Class Code indicates the type of device (e.g., network controller, graphics card, storage controller). The BARs define the memory and I/O address ranges that the device uses. The Command and Status Registers control and report the device's operational state.
PRACTICAL USE CASES
Common use cases include:
Driver Development: Inspecting configuration space during driver initialization and operation.
Hardware Debugging: Identifying hardware conflicts or misconfigurations.
System Analysis: Understanding how PCI devices are interacting with the system.
Security Auditing: Verifying the security settings of PCI devices.
HISTORY
The `pcidump` command's history is somewhat intertwined with the evolution of PCI bus technology in Linux. While specific authorship details are difficult to pinpoint, it likely emerged as a crucial debugging and diagnostic tool as PCI became the standard bus interface. It would have been developed as a means to inspect the PCI configuration space directly, helping kernel developers and hardware engineers understand and troubleshoot PCI device interactions. Its usage has been prevalent in driver development and system administration where low-level device information is needed.