PCILeechGen icon indicating copy to clipboard operation
PCILeechGen copied to clipboard

Error: Device collection failed

Open Clydeston opened this issue 7 months ago • 1 comments

Description

While trying to collect bar data Can confirm device is not in d3, have rebound driver to both native and vfio-pci and still no joy. Any suggestions please? Thanks for the tool and the help!

# ./pcileechgen build --bdf 0000:08:00.0 --lib-dir ~/PCILeechGen/lib/ --board PcieSquirrel --vivado-path ~/vivado/2025.2/
2026/04/15 04:12:31 INFO target device bdf=0000:08:00.0
2026/04/15 04:12:31 INFO collecting donor device data
2026/04/15 04:12:31 WARN sysfs BAR read returned all 0xFF bar=0
2026/04/15 04:12:31 INFO BAR read complete bar=0 bytes=4096
2026/04/15 04:12:31 INFO BAR read complete bar=2 bytes=4096
2026/04/15 04:12:31 INFO BAR profiling skipped: content is all 0xFF bar=0
2026/04/15 04:12:31 INFO BAR profiled bar=2 active_registers=1024
2026/04/15 04:12:31 WARN BAR content is all 0xFF - device may be inaccessible or in D3 power state bar=0 bytes=4096 class=0x028000
Error: device data collection failed: BAR content for class 0x028000 is all 0xFF (driver "vfio-pci"). The device is not responding - possible causes:
  • device is in D3 (sleep) power state
  • IOMMU/VT-d not enabled or misconfigured
  • PCI Command Register memory space not enabled
  • device requires native driver initialization (e.g. CNVi WiFi, firmware-dependent devices)
Without valid BAR data, Windows will produce Code 10 and DMA will not work

Workarounds:
  1. Try: sudo setpci -s 0000:08:00.0 COMMAND=0x06
  2. For CNVi/WiFi: boot with native driver, dump BAR with a tool, then use --from-json
Usage:
  pcileechgen build [flags]

Flags:
      --bdf string           donor device BDF address (e.g. 0000:03:00.0)
      --board string         target FPGA board name (required, e.g. PCIeSquirrel)
      --from-json string     load donor device data from JSON file (offline build)
  -h, --help                 help for build
      --jobs int             number of parallel Vivado jobs (default 4)
      --lib-dir string       path to pcileech-fpga library (default "lib/pcileech-fpga")
      --output string        output directory (default "pcileech_datastore")
      --skip-vivado          skip Vivado synthesis (only generate artifacts)
      --stock-bar            use stock bar controller (diagnostic: skip custom SV modules)
      --timeout int          Vivado synthesis timeout in seconds (default 3600)
      --vivado-path string   path to Vivado installation

device data collection failed: BAR content for class 0x028000 is all 0xFF (driver "vfio-pci"). The device is not responding - possible causes:
  • device is in D3 (sleep) power state
  • IOMMU/VT-d not enabled or misconfigured
  • PCI Command Register memory space not enabled
  • device requires native driver initialization (e.g. CNVi WiFi, firmware-dependent devices)
Without valid BAR data, Windows will produce Code 10 and DMA will not work

Workarounds:
  1. Try: sudo setpci -s 0000:08:00.0 COMMAND=0x06
  2. For CNVi/WiFi: boot with native driver, dump BAR with a tool, then use --from-json

Error Type

Build/generation failure

Device Context File

N/A

Windows Event Log


Device Manager Error Details

No response

Terminal Output


Clydeston avatar Apr 15 '26 08:04 Clydeston

this is fixed now. the validator was rejecting the whole collection when any single bar returned 0xff, even if another bar had good data. now it only fails if every memory bar is dead. if one bar has valid registers it warns and moves on.

sercanarga avatar Apr 27 '26 00:04 sercanarga