PCILeechGen icon indicating copy to clipboard operation
PCILeechGen copied to clipboard

Error: device data collection failed

Open sthgi opened this issue 8 months ago • 1 comments

Description

root@beelink:~/PCILeechGen# sudo setpci -s 0000:03:00.0 COMMAND=0x06
root@beelink:~/PCILeechGen# sudo ./bin/pcileechgen build --bdf 0000:03:00.0 --board CaptainDMA_100T
2026/03/09 18:21:21 INFO target device bdf=0000:03:00.0
2026/03/09 18:21:21 INFO collecting donor device data
2026/03/09 18:21:21 INFO PCI memory space enabled bdf=0000:03:00.0
2026/03/09 18:21:21 WARN sysfs BAR read returned all 0xFF, will retry via VFIO bar=2
2026/03/09 18:21:21 INFO BAR read complete bar=2 bytes=4096
2026/03/09 18:21:21 WARN sysfs BAR read returned all 0xFF, will retry via VFIO bar=4
2026/03/09 18:21:21 INFO BAR read complete bar=4 bytes=4096
2026/03/09 18:21:21 INFO retrying BAR reads via VFIO
2026/03/09 18:21:21 WARN VFIO BAR fallback failed error="VFIO API version check failed: errno 0"
2026/03/09 18:21:21 INFO BAR profiled bar=2 active_registers=1024
2026/03/09 18:21:21 INFO BAR profiled bar=4 active_registers=1024
2026/03/09 18:21:21 INFO MSI-X detected vectors=32 table_bar=4 table_offset=0x0 pba_bar=4 pba_offset=0x800
2026/03/09 18:21:21 WARN BAR content is all 0xFF — device may be inaccessible or in D3 power state bar=2 bytes=4096 class=0x020000
2026/03/09 18:21:21 WARN BAR content is all 0xFF — device may be inaccessible or in D3 power state bar=4 bytes=4096 class=0x020000
Error: device data collection failed: BAR content for class 0x020000 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:03: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)
      --timeout int          Vivado synthesis timeout in seconds (default 3600)
      --vivado-path string   path to Vivado installation

device data collection failed: BAR content for class 0x020000 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:03:00.0 COMMAND=0x06
  2. For CNVi/WiFi: boot with native driver, dump BAR with a tool, then use --from-json

Error Type

Code 10 (device cannot start)

Device Context File

NA

Windows Event Log


Device Manager Error Details

No response

Terminal Output


sthgi avatar Mar 09 '26 23:03 sthgi

found a bug on our side. the vfio api version in the linux kernel is defined as 0, but we were checking if version == 0 and treating it as a failure. so the vfio fallback path was never actually working for anyone.

fixed now along with a few other bar read improvements. please pull and rebuild with make build.

sercanarga avatar Mar 09 '26 23:03 sercanarga