Answer: To decode PCI configuration space, dump the raw bytes with sudo lspci -xxxx -s <BDF> and read them as little-endian registers: Vendor and Device ID at 0x00, Command/Status at 0x04, class at 0x09, BARs from 0x10, then follow the capability pointer at 0x34 and the extended list from 0x100.
One device at a time. Hex rows only: use lspci -xxxx, not lspci -vvv.
Samples are synthetic and labelled; they are not hardware captures.
Capture the dump
Find the device address first, then dump its configuration bytes. Reading configuration space does not write to the device.
lspci -nn # find the BDF, for example 01:00.0
sudo lspci -xxxx -s 01:00.0 # full 4 KiB PCIe space (root required)
lspci -xxx -s 01:00.0 # 256 bytes; non-root sees only 64Prefer the full -xxxx dump. AER, ACS, SR-IOV and Resizable BAR are extended capabilities above offset 0x100, so a 256-byte dump cannot show them.
What the decoder reads
| Offset | Register | Why it matters |
|---|---|---|
0x00 | Vendor ID, Device ID | Identifies the function. ffff means nothing answered. |
0x04 | Command, Status | Memory decode and bus-master enables; latched PCI error bits; whether a capability list exists. |
0x08 | Revision, Class code | What kind of device this is (display, NVMe, bridge, accelerator…). |
0x0e | Header type | Type 0 endpoint (six BARs) or Type 1 bridge (two BARs plus bus numbers); bit 7 marks multi-function. |
0x10–0x27 | BARs | Assigned MMIO/I/O base addresses, 32- or 64-bit, prefetchable or not. |
0x34 | Capability pointer | Start of the linked list: Power Management, MSI/MSI-X, PCI Express… |
PCIe cap + 0x0c / 0x12 | Link Capabilities / Link Status | Maximum versus negotiated speed and width. This is where “x16 running at x8” shows up. |
0x100+ | Extended capabilities | AER status/mask/severity, ACS, SR-IOV, Resizable BAR, DPC, L1 substates. |
Each decoded value lists its offset under “Register evidence”, so you can check it against the specification or a second capture. Missing bytes stay unknown; they are never treated as zero.
Kernel log shows “PCIe Bus Error” lines for this device? Paste them into the PCIe Bus Error decoder to see which bits repeat and how often. Going further: compare two captures, correlate kernel AER messages and export a report in the Header7F Console. If the device shows as ff or is missing entirely, start with unknown header type 7f or device missing from lspci.
Questions
- How do I dump PCI config space on Linux?
- Run
sudo lspci -xxxx -s 01:00.0, replacing 01:00.0 with your device address fromlspci. Without root, Linux returns only the first 64 bytes, which is enough for identity and BARs but not for capabilities or AER. - What is the difference between lspci -x, -xxx and -xxxx?
-xshows the 64-byte standard header,-xxxthe full 256-byte PCI configuration space, and-xxxxthe 4096-byte PCIe extended space where AER, ACS, SR-IOV and Resizable BAR live.- Why does my dump show only ff bytes?
- All-ones reads usually mean the function did not answer the configuration request: wrong address, device in D3cold, link down or a device that dropped off the bus. The decoder refuses to interpret an all-ff capture rather than report fake fields.
- Can this decoder tell me the BAR size?
- No. A BAR register holds the assigned base address. Size is learned by the kernel during enumeration; read it from
lspci -vv“Region” lines or/sys/bus/pci/devices/<BDF>/resource. - Does a corrected AER status bit mean the hardware is failing?
- Not by itself. AER status bits are sticky and may be cleared by software, so a set bit shows that an error was logged at some point. Compare against a baseline capture and the kernel log before replacing hardware.
- Is it safe to paste a dump here?
- Yes. The page decodes in your browser and sends nothing. Configuration space contains IDs and addresses, not user data, but you can still review it before sharing a report with others.
Sources and scope
Updated . Decoding runs locally in your browser; the pasted text is not uploaded, stored or logged.
Guides that use this tool
- lspci explained: read lspci -vvv field by field
- PCIe errors on Linux: AER corrected vs uncorrectable, explained
- PCIe BARs explained: BAR0–5, sizing, MMIO, Above 4G decoding and “can’t assign; no space”
- XDMA vs QDMA: which AMD PCIe DMA IP — and how to run the XDMA driver on Linux
- PCIe link training, speed and width: why your link is x8, x1 or “downgraded”
- “GPU has fallen off the bus” / Xid 79 on Linux: an AER-first triage
- Buying a used mining GPU for AI or gaming? Read its PCIe link and error history first