PCILeechGen icon indicating copy to clipboard operation
PCILeechGen copied to clipboard

still got Error: device data collection failed

Open WeiXiaoBlueRabbit opened this issue 8 months ago • 1 comments

Description

I pulled and built the latest version, and tried RTL8111/8168/8411 again. Before building, I executed the command sudo setpci -s 0000:08:00.0 COMMAND=0x06. However, I still encountered an error: device data collection failed :

sudo setpci -s 0000:08:00.0 COMMAND=0x06
sudo ./bin/pcileechgen build --bdf 0000:08:00.0 --board CaptainDMA_75T --skip-vivado
2026/03/10 12:33:53 INFO target device bdf=0000:08:00.0
2026/03/10 12:33:53 INFO collecting donor device data
2026/03/10 12:33:53 INFO PCI memory space enabled bdf=0000:08:00.0
2026/03/10 12:33:53 WARN sysfs BAR read returned all 0xFF, will retry via VFIO bar=2
2026/03/10 12:33:53 INFO BAR read complete bar=2 bytes=4096
2026/03/10 12:33:53 WARN sysfs BAR read returned all 0xFF, will retry via VFIO bar=4
2026/03/10 12:33:53 INFO BAR read complete bar=4 bytes=4096
2026/03/10 12:33:53 INFO retrying BAR reads via VFIO
2026/03/10 12:33:53 INFO BAR read via VFIO bar=0 bytes=256
2026/03/10 12:33:53 INFO BAR profiled bar=2 active_registers=1024
2026/03/10 12:33:54 INFO BAR profiled bar=4 active_registers=1024
2026/03/10 12:33:54 INFO MSI-X detected vectors=4 table_bar=4 table_offset=0x0 pba_bar=4 pba_offset=0x800
2026/03/10 12:33:54 WARN BAR content is all 0xFF - device may be inaccessible or in D3 power state bar=2 bytes=4096 class=0x020000
2026/03/10 12:33:54 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: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)
      --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:08:00.0 COMMAND=0x06
  2. For CNVi/WiFi: boot with native driver, dump BAR with a tool, then use --from-json

Error Type

Collection failure

Device Context File

no generated

Windows Event Log


Device Manager Error Details

No response

Terminal Output


WeiXiaoBlueRabbit avatar Mar 10 '26 04:03 WeiXiaoBlueRabbit

this should be fixed now. the tool automatically tries switching to the native driver when bars come back as 0xFF, reads them, and switches back. realtek controllers need the native driver to init their registers, and this handles that.

pull the latest and try again. if it still fails, make sure iommu is properly enabled (dmesg | grep -i iommu).

sercanarga avatar Mar 10 '26 15:03 sercanarga