Error: device data collection failed
Description
This error has occurred again.
sudo ./bin/pcileechgen check --bdf 0000:08:00.0
Checking device 0000:08:00.0...
[OK] Device found: 10ec:8168 Ethernet controller
[OK] Config space readable: 4096 bytes
[OK] IOMMU is enabled
[OK] VFIO modules loaded
[OK] IOMMU group: 16
[OK] Device is alone in its IOMMU group
[OK] Power state: D0 (active)
[OK] Already bound to vfio-pci
Capabilities (4):
[01] Power Management at offset 0x40
[05] MSI at offset 0x50
[10] PCI Express at offset 0x70
[11] MSI-X at offset 0xb0
Extended Capabilities (5):
[0001] Advanced Error Reporting at offset 0x100
[0002] Virtual Channel (No MFVC) at offset 0x140
[0003] Device Serial Number at offset 0x160
[0018] Latency Tolerance Reporting at offset 0x170
[001e] L1 PM Substates at offset 0x178
BARs:
BAR0: io at 0x3000, size 256 B
BAR2: mem64 at 0xb2204000, size 4 KB
BAR4: mem64 at 0xb2200000, size 16 KB
--- Board Compatibility ---
Donor Link: Gen1 (2.5 GT/s) x1
Donor DSN: 0x01000000684CE000
Compatible boards:
[OK] PCIeSquirrel xc7a35tfgg484-2 x1 (exact match)
[OK] ScreamerM2 xc7a35tcsg325-2 x1 (exact match)
[OK] pciescreamer xc7a35tfgg484-2 x1 (exact match)
[OK] EnigmaX1 xc7a75tfgg484-2 x1 (exact match)
[OK] CaptainDMA_M2_x1 xc7a35tcsg325-2 x1 (exact match)
[OK] CaptainDMA_M2_x4 xc7a35tcsg325-2 x4
[OK] CaptainDMA_35T xc7a35tfgg484-2 x1 (exact match)
[OK] CaptainDMA_75T xc7a75tfgg484-2 x1 (exact match)
[OK] CaptainDMA_100T xc7a100tfgg484-2 x1 (exact match)
[OK] ZDMA xc7a100tfgg484-2 x4
[OK] GBOX xc7a35tfgg484-2 x1 (exact match)
[OK] NeTV2_35T xc7a35tfgg484-2 x1 (exact match)
[OK] NeTV2_100T xc7a100tfgg484-2 x1 (exact match)
[OK] ac701_ft601 xc7a200tfbg676-2 x4
[OK] acorn xc7a200tfbg484-3 x4
[OK] litefury xc7a100tfgg484-2 x4
[OK] sp605_ft601 xc6slx45tfgg484-2 x1 (exact match)
Total: 17 boards
--- Summary ---
[OK] Device is ready for firmware generation
sudo ./bin/pcileechgen build --bdf 0000:08:00.0 --board CaptainDMA_75t --skip-vivado
2026/03/12 12:50:23 INFO target device bdf=0000:08:00.0
2026/03/12 12:50:23 INFO collecting donor device data
2026/03/12 12:50:23 INFO PCI memory space enabled bdf=0000:08:00.0
2026/03/12 12:50:23 WARN sysfs BAR read returned all 0xFF, will retry via VFIO bar=2
2026/03/12 12:50:23 INFO BAR read complete bar=2 bytes=4096
2026/03/12 12:50:23 WARN sysfs BAR read returned all 0xFF, will retry via VFIO bar=4
2026/03/12 12:50:23 INFO BAR read complete bar=4 bytes=4096
2026/03/12 12:50:23 INFO retrying BAR reads via VFIO
2026/03/12 12:50:24 INFO all memory BAR contents are 0xFF, attempting native driver rebind cycle
2026/03/12 12:50:24 INFO waiting for native driver to initialize device... delay=3s
2026/03/12 12:50:27 WARN native driver rebind cycle did not recover any BAR data
2026/03/12 12:50:27 INFO BAR profiled bar=2 active_registers=1024
2026/03/12 12:50:27 INFO BAR profiled bar=4 active_registers=1024
2026/03/12 12:50:27 INFO MSI-X detected vectors=4 table_bar=4 table_offset=0x0 pba_bar=4 pba_offset=0x800
2026/03/12 12:50:27 WARN BAR content is all 0xFF - device may be inaccessible or in D3 power state bar=2 bytes=4096 class=0x020000
2026/03/12 12:50:27 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
I tried to use the method in the 16SalomonArs/Pcileech-DMA-FirmwareCustomizationGuide to dump the memory. The results showed that regardless of whether I bound the driver to r8169 or vfio-pci, I could obtain memory values (not all 0xFF).
This is the code for dumping memory usage. Perhaps it can provide new ideas?:
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
int main(int argc, char **argv) {
if (argc < 2) {
printf("Usage: %s /sys/bus/pci/devices/XXXX:XX:XX.X/resource0\n", argv[0]);
return 1;
}
int fd = open(argv[1], O_RDONLY);
if (fd < 0) {
perror("open");
return 1;
}
void *mem = mmap(NULL, 4096, PROT_READ, MAP_SHARED, fd, 0);
if (mem == MAP_FAILED) {
perror("mmap");
close(fd);
return 1;
}
// Output in Verilog case format
printf("// BAR0 memory dump for Verilog\n");
for (int offset = 0; offset < 4096; offset += 4) {
uint32_t val = *(uint32_t *)(mem + offset);
printf("16'h%04X: rd_rsp_data <= 32'h%08X;\n", offset, val);
}
munmap(mem, 4096);
close(fd);
return 0;
}
Error Type
Collection failure
Device Context File
NA
Windows Event Log
Device Manager Error Details
No response
Terminal Output
hey, thanks for reporting this and especially for sharing that mmap dump code, it pointed me right to the problem.
your device was fine the whole time, it was the reading method that couldn't reach the bar data. i found three things going wrong:
- after enabling pci memory space, the code wasn't giving the device any time to settle before reading. rtl8168 needs a brief moment.
- when the first read came back as 0xff, the vfio retry was using
pread(), which doesn't work on some devices. your c code showed thatmmap()does work, so i added that as a fallback. - the native driver rebind only waited 3 seconds, which isn't always enough. bumped it to 5s and added retries.
this should be fixed now. pull the latest and try again.
Hello, I pulled and tried the latest version, unfortunately, the issue persists, and I noticed a very strange phenomenon. When I use the previous C code to dump memory, whether or not I bind vfio-pci, I can get valid memory values. However, after executing the build command like this: sudo ./bin/pcileechgen build --bdf 0000:08:00.0 --board CaptainDMA_75T --skip-vivado, the device data collection failed, and when I use the C code to dump memory again, I found that the values obtained at this time are all 0xFF.
sudo ./bin/pcileechgen check --bdf 0000:08:00.0
Checking device 0000:08:00.0...
[OK] Device found: 10ec:8168 Ethernet controller
[OK] Config space readable: 4096 bytes
[OK] IOMMU is enabled
[OK] VFIO modules loaded
[OK] IOMMU group: 16
[OK] Device is alone in its IOMMU group
[OK] Power state: D0 (active)
[OK] Already bound to vfio-pci
Capabilities (4):
[01] Power Management at offset 0x40
[05] MSI at offset 0x50
[10] PCI Express at offset 0x70
[11] MSI-X at offset 0xb0
Extended Capabilities (5):
[0001] Advanced Error Reporting at offset 0x100
[0002] Virtual Channel (No MFVC) at offset 0x140
[0003] Device Serial Number at offset 0x160
[0018] Latency Tolerance Reporting at offset 0x170
[001e] L1 PM Substates at offset 0x178
BARs:
BAR0: io at 0x3000, size 256 B
BAR2: mem64 at 0xb2204000, size 4 KB
BAR4: mem64 at 0xb2200000, size 16 KB
--- Board Compatibility ---
Donor Link: Gen1 (2.5 GT/s) x1
Donor DSN: 0x01000000684CE000
Compatible boards:
[OK] PCIeSquirrel xc7a35tfgg484-2 x1 (exact match)
[OK] ScreamerM2 xc7a35tcsg325-2 x1 (exact match)
[OK] pciescreamer xc7a35tfgg484-2 x1 (exact match)
[OK] EnigmaX1 xc7a75tfgg484-2 x1 (exact match)
[OK] CaptainDMA_M2_x1 xc7a35tcsg325-2 x1 (exact match)
[OK] CaptainDMA_M2_x4 xc7a35tcsg325-2 x4
[OK] CaptainDMA_35T xc7a35tfgg484-2 x1 (exact match)
[OK] CaptainDMA_75T xc7a75tfgg484-2 x1 (exact match)
[OK] CaptainDMA_100T xc7a100tfgg484-2 x1 (exact match)
[OK] ZDMA xc7a100tfgg484-2 x4
[OK] GBOX xc7a35tfgg484-2 x1 (exact match)
[OK] NeTV2_35T xc7a35tfgg484-2 x1 (exact match)
[OK] NeTV2_100T xc7a100tfgg484-2 x1 (exact match)
[OK] ac701_ft601 xc7a200tfbg676-2 x4
[OK] acorn xc7a200tfbg484-3 x4
[OK] litefury xc7a100tfgg484-2 x4
[OK] sp605_ft601 xc6slx45tfgg484-2 x1 (exact match)
Total: 17 boards
--- Summary ---
[OK] Device is ready for firmware generation
sudo ./bin/pcileechgen build --bdf 0000:08:00.0 --board CaptainDMA_75T --skip-vivado
2026/03/12 21:22:32 INFO target device bdf=0000:08:00.0
2026/03/12 21:22:32 INFO collecting donor device data
2026/03/12 21:22:32 INFO PCI memory space enabled bdf=0000:08:00.0
2026/03/12 21:22:32 WARN sysfs BAR read returned all 0xFF, will retry via VFIO bar=2
2026/03/12 21:22:32 INFO BAR read complete bar=2 bytes=4096
2026/03/12 21:22:32 WARN sysfs BAR read returned all 0xFF, will retry via VFIO bar=4
2026/03/12 21:22:32 INFO BAR read complete bar=4 bytes=4096
2026/03/12 21:22:32 INFO retrying BAR reads via VFIO
2026/03/12 21:22:33 INFO all memory BAR contents are 0xFF, attempting native driver rebind cycle
2026/03/12 21:22:33 INFO waiting for native driver to initialize device... delay=5s
2026/03/12 21:22:38 INFO native driver rebind: retrying BAR reads attempt=1 max=3
2026/03/12 21:22:39 INFO native driver rebind: retrying BAR reads attempt=2 max=3
2026/03/12 21:22:40 INFO native driver rebind: retrying BAR reads attempt=3 max=3
2026/03/12 21:22:41 WARN native driver rebind cycle did not recover any BAR data
2026/03/12 21:22:41 INFO BAR profiled bar=2 active_registers=1024
2026/03/12 21:22:41 INFO BAR profiled bar=4 active_registers=1024
2026/03/12 21:22:41 INFO MSI-X detected vectors=4 table_bar=4 table_offset=0x0 pba_bar=4 pba_offset=0x800
2026/03/12 21:22:41 WARN BAR content is all 0xFF - device may be inaccessible or in D3 power state bar=2 bytes=4096 class=0x020000
2026/03/12 21:22:41 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
thanks for the follow-up, that was the key clue. turns out the build command itself was corrupting the device, not just failing to read it.
found three things:
- the code was writing to config space (enabling memory space) before even trying to read. your c code works without that, so now it reads first and only touches config space if needed.
- when that failed, it opened a vfio session to retry. closing that session can trigger a function level reset, which is what was permanently killing bar access. removed that entirely.
- the bar profiler was writing test patterns (0xffffffff/0x00000000) to every register even on unresponsive bars. on rtl8168 that bricks the device. now it skips profiling when bars read as 0xff.
Unfortunately, the issue persists, and I have noticed that after executing the build command, check command displays Power state: D3hot - device should be in D0 for reliable reads.
sudo ./bin/pcileechgen check --bdf 0000:08:00.0
Checking device 0000:08:00.0...
[OK] Device found: 10ec:8168 Ethernet controller
[OK] Config space readable: 4096 bytes
[OK] IOMMU is enabled
[OK] VFIO modules loaded
[OK] IOMMU group: 16
[OK] Device is alone in its IOMMU group
[OK] Power state: D0 (active)
[OK] Already bound to vfio-pci
Capabilities (4):
[01] Power Management at offset 0x40
[05] MSI at offset 0x50
[10] PCI Express at offset 0x70
[11] MSI-X at offset 0xb0
Extended Capabilities (5):
[0001] Advanced Error Reporting at offset 0x100
[0002] Virtual Channel (No MFVC) at offset 0x140
[0003] Device Serial Number at offset 0x160
[0018] Latency Tolerance Reporting at offset 0x170
[001e] L1 PM Substates at offset 0x178
BARs:
BAR0: io at 0x3000, size 256 B
BAR2: mem64 at 0xb2204000, size 4 KB
BAR4: mem64 at 0xb2200000, size 16 KB
--- Board Compatibility ---
Donor Link: Gen1 (2.5 GT/s) x1
Donor DSN: 0x01000000684CE000
Compatible boards:
[OK] PCIeSquirrel xc7a35tfgg484-2 x1 (exact match)
[OK] ScreamerM2 xc7a35tcsg325-2 x1 (exact match)
[OK] pciescreamer xc7a35tfgg484-2 x1 (exact match)
[OK] EnigmaX1 xc7a75tfgg484-2 x1 (exact match)
[OK] CaptainDMA_M2_x1 xc7a35tcsg325-2 x1 (exact match)
[OK] CaptainDMA_M2_x4 xc7a35tcsg325-2 x4
[OK] CaptainDMA_35T xc7a35tfgg484-2 x1 (exact match)
[OK] CaptainDMA_75T xc7a75tfgg484-2 x1 (exact match)
[OK] CaptainDMA_100T xc7a100tfgg484-2 x1 (exact match)
[OK] ZDMA xc7a100tfgg484-2 x4
[OK] GBOX xc7a35tfgg484-2 x1 (exact match)
[OK] NeTV2_35T xc7a35tfgg484-2 x1 (exact match)
[OK] NeTV2_100T xc7a100tfgg484-2 x1 (exact match)
[OK] ac701_ft601 xc7a200tfbg676-2 x4
[OK] acorn xc7a200tfbg484-3 x4
[OK] litefury xc7a100tfgg484-2 x4
[OK] sp605_ft601 xc6slx45tfgg484-2 x1 (exact match)
Total: 17 boards
--- Summary ---
[OK] Device is ready for firmware generation
sudo ./bin/pcileechgen build --bdf 0000:08:00.0 --board CaptainDMA_75T --skip-vivado
2026/03/13 14:00:42 INFO target device bdf=0000:08:00.0
2026/03/13 14:00:42 INFO collecting donor device data
2026/03/13 14:00:42 WARN sysfs BAR read returned all 0xFF bar=2
2026/03/13 14:00:42 INFO BAR read complete bar=2 bytes=4096
2026/03/13 14:00:42 WARN sysfs BAR read returned all 0xFF bar=4
2026/03/13 14:00:42 INFO BAR read complete bar=4 bytes=4096
2026/03/13 14:00:42 INFO PCI memory space enabled bdf=0000:08:00.0
2026/03/13 14:00:43 WARN sysfs BAR read returned all 0xFF bar=2
2026/03/13 14:00:43 INFO BAR read complete bar=2 bytes=4096
2026/03/13 14:00:43 WARN sysfs BAR read returned all 0xFF bar=4
2026/03/13 14:00:43 INFO BAR read complete bar=4 bytes=4096
2026/03/13 14:00:43 INFO all memory BAR contents are 0xFF, attempting native driver rebind cycle
2026/03/13 14:00:43 INFO waiting for native driver to initialize device... delay=5s
2026/03/13 14:00:48 INFO native driver rebind: retrying BAR reads attempt=1 max=3
2026/03/13 14:00:49 INFO native driver rebind: retrying BAR reads attempt=2 max=3
2026/03/13 14:00:50 INFO native driver rebind: retrying BAR reads attempt=3 max=3
2026/03/13 14:00:51 WARN native driver rebind cycle did not recover any BAR data
2026/03/13 14:00:51 INFO BAR profiling skipped: content is all 0xFF bar=2
2026/03/13 14:00:51 INFO BAR profiling skipped: content is all 0xFF bar=4
2026/03/13 14:00:51 INFO MSI-X detected vectors=4 table_bar=4 table_offset=0x0 pba_bar=4 pba_offset=0x800
2026/03/13 14:00:51 WARN BAR content is all 0xFF - device may be inaccessible or in D3 power state bar=2 bytes=4096 class=0x020000
2026/03/13 14:00:51 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
sudo ./bin/pcileechgen check --bdf 0000:08:00.0
Checking device 0000:08:00.0...
[OK] Device found: 10ec:8168 Ethernet controller
[OK] Config space readable: 4096 bytes
[OK] IOMMU is enabled
[OK] VFIO modules loaded
[OK] IOMMU group: 16
[OK] Device is alone in its IOMMU group
[FAIL] Power state: D3hot - device should be in D0 for reliable reads
Fix: echo 0 | sudo tee /sys/bus/pci/devices/0000:08:00.0/d3cold_allowed
[OK] Already bound to vfio-pci
Capabilities (4):
[01] Power Management at offset 0x40
[05] MSI at offset 0x50
[10] PCI Express at offset 0x70
[11] MSI-X at offset 0xb0
Extended Capabilities (5):
[0001] Advanced Error Reporting at offset 0x100
[0002] Virtual Channel (No MFVC) at offset 0x140
[0003] Device Serial Number at offset 0x160
[0018] Latency Tolerance Reporting at offset 0x170
[001e] L1 PM Substates at offset 0x178
BARs:
BAR0: io at 0x3000, size 256 B
BAR2: mem64 at 0xb2204000, size 4 KB
BAR4: mem64 at 0xb2200000, size 16 KB
--- Board Compatibility ---
Donor Link: Gen1 (2.5 GT/s) x1
Donor DSN: 0x01000000684CE000
Compatible boards:
[OK] PCIeSquirrel xc7a35tfgg484-2 x1 (exact match)
[OK] ScreamerM2 xc7a35tcsg325-2 x1 (exact match)
[OK] pciescreamer xc7a35tfgg484-2 x1 (exact match)
[OK] EnigmaX1 xc7a75tfgg484-2 x1 (exact match)
[OK] CaptainDMA_M2_x1 xc7a35tcsg325-2 x1 (exact match)
[OK] CaptainDMA_M2_x4 xc7a35tcsg325-2 x4
[OK] CaptainDMA_35T xc7a35tfgg484-2 x1 (exact match)
[OK] CaptainDMA_75T xc7a75tfgg484-2 x1 (exact match)
[OK] CaptainDMA_100T xc7a100tfgg484-2 x1 (exact match)
[OK] ZDMA xc7a100tfgg484-2 x4
[OK] GBOX xc7a35tfgg484-2 x1 (exact match)
[OK] NeTV2_35T xc7a35tfgg484-2 x1 (exact match)
[OK] NeTV2_100T xc7a100tfgg484-2 x1 (exact match)
[OK] ac701_ft601 xc7a200tfbg676-2 x4
[OK] acorn xc7a200tfbg484-3 x4
[OK] litefury xc7a100tfgg484-2 x4
[OK] sp605_ft601 xc6slx45tfgg484-2 x1 (exact match)
Total: 17 boards
--- Summary ---
[FAIL] 1 issue(s) found - see above for details
I have the same problem where sysfs returns all 0xFF. After testing, I believe I found the root cause. I manually forced both the donor device and its parent PCI bridge into D0 mode, then successfully unbound the r8169 driver and bound it to vfio-pci. The device remained in D0 state throughout this process. However, the moment the script starts, the donor device immediately flips to D3hot and becomes inaccessible. It appears the script (or the underlying pcileechgen binary) triggers a PCI reset or a configuration sequence that causes the device to hang in a low-power state.
testuser@testuser-MS-7D18:~/PCILeechGen$ grep . /sys/bus/pci/devices/0000:0{0:1c.7,5:00.0}/power_state
/sys/bus/pci/devices/0000:00:1c.7/power_state:D0
/sys/bus/pci/devices/0000:05:00.0/power_state:D0
testuser@testuser-MS-7D18:~/PCILeechGen$ sudo ./bin/pcileechgen check --bdf 0000:05:00.0
Checking device 0000:05:00.0...
[OK] Device found: 10ec:8168 Ethernet controller
[OK] Config space readable: 4096 bytes
[OK] IOMMU is enabled
[OK] VFIO modules loaded
[OK] IOMMU group: 15
[OK] Device is alone in its IOMMU group
[OK] Power state: D0 (active)
[OK] Already bound to vfio-pci
Capabilities (5):
[01] Power Management at offset 0x40
[05] MSI at offset 0x50
[10] PCI Express at offset 0x70
[11] MSI-X at offset 0xb0
[03] Vital Product Data at offset 0xd0
Extended Capabilities (3):
[0001] Advanced Error Reporting at offset 0x100
[0002] Virtual Channel (No MFVC) at offset 0x140
[0003] Device Serial Number at offset 0x160
BARs:
BAR0: io at 0x3000, size 256 B
BAR2: mem64 at 0xa4200000, size 4 KB
BAR4: mem64 at 0xa2100000, size 16 KB [prefetchable]
--- Board Compatibility ---
Donor Link: Gen1 (2.5 GT/s) x1
Donor DSN: 0x01000000684CE000
Compatible boards:
[OK] PCIeSquirrel xc7a35tfgg484-2 x1 (exact match)
[OK] ScreamerM2 xc7a35tcsg325-2 x1 (exact match)
[OK] pciescreamer xc7a35tfgg484-2 x1 (exact match)
[OK] EnigmaX1 xc7a75tfgg484-2 x1 (exact match)
[OK] CaptainDMA_M2_x1 xc7a35tcsg325-2 x1 (exact match)
[OK] CaptainDMA_M2_x4 xc7a35tcsg325-2 x4
[OK] CaptainDMA_35T xc7a35tfgg484-2 x1 (exact match)
[OK] CaptainDMA_75T xc7a75tfgg484-2 x1 (exact match)
[OK] CaptainDMA_100T xc7a100tfgg484-2 x1 (exact match)
[OK] ZDMA xc7a100tfgg484-2 x4
[OK] GBOX xc7a35tfgg484-2 x1 (exact match)
[OK] NeTV2_35T xc7a35tfgg484-2 x1 (exact match)
[OK] NeTV2_100T xc7a100tfgg484-2 x1 (exact match)
[OK] ac701_ft601 xc7a200tfbg676-2 x4
[OK] acorn xc7a200tfbg484-3 x4
[OK] litefury xc7a100tfgg484-2 x4
[OK] sp605_ft601 xc6slx45tfgg484-2 x1 (exact match)
Total: 17 boards
--- Summary ---
[OK] Device is ready for firmware generation
testuser@testuser-MS-7D18:~/PCILeechGen$ sudo ./bin/pcileechgen build --bdf 0000:05:00.0 --board CaptainDMA_75T --skip-vivado
2026/03/21 14:22:30 INFO target device bdf=0000:05:00.0
2026/03/21 14:22:30 INFO collecting donor device data
2026/03/21 14:22:30 WARN sysfs BAR read returned all 0xFF bar=2
2026/03/21 14:22:30 INFO BAR read complete bar=2 bytes=4096
2026/03/21 14:22:30 WARN sysfs BAR read returned all 0xFF bar=4
2026/03/21 14:22:30 INFO BAR read complete bar=4 bytes=4096
2026/03/21 14:22:30 INFO PCI memory space enabled bdf=0000:05:00.0
2026/03/21 14:22:30 WARN sysfs BAR read returned all 0xFF bar=2
2026/03/21 14:22:30 INFO BAR read complete bar=2 bytes=4096
2026/03/21 14:22:30 WARN sysfs BAR read returned all 0xFF bar=4
2026/03/21 14:22:30 INFO BAR read complete bar=4 bytes=4096
2026/03/21 14:22:30 INFO all memory BAR contents are 0xFF, attempting native driver rebind cycle
2026/03/21 14:22:30 INFO waiting for native driver to initialize device... delay=5s
2026/03/21 14:22:35 INFO native driver rebind: retrying BAR reads attempt=1 max=3
2026/03/21 14:22:36 INFO native driver rebind: retrying BAR reads attempt=2 max=3
2026/03/21 14:22:37 INFO native driver rebind: retrying BAR reads attempt=3 max=3
2026/03/21 14:22:38 WARN native driver rebind cycle did not recover any BAR data
2026/03/21 14:22:38 INFO BAR profiling skipped: content is all 0xFF bar=2
2026/03/21 14:22:38 INFO BAR profiling skipped: content is all 0xFF bar=4
2026/03/21 14:22:38 INFO MSI-X detected vectors=4 table_bar=4 table_offset=0x0 pba_bar=4 pba_offset=0x800
2026/03/21 14:22:38 WARN BAR content is all 0xFF - device may be inaccessible or in D3 power state bar=2 bytes=4096 class=0x020000
2026/03/21 14:22:38 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:05: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:05:00.0 COMMAND=0x06
2. For CNVi/WiFi: boot with native driver, dump BAR with a tool, then use --from-json
testuser@testuser-MS-7D18:~/PCILeechGen$ grep . /sys/bus/pci/devices/0000:0{0:1c.7,5:00.0}/power_state
/sys/bus/pci/devices/0000:00:1c.7/power_state:D0
/sys/bus/pci/devices/0000:05:00.0/power_state:D3hot
@Aibolit78 Have you solved this problem? I am using a laptop as the donation device. Is this the reason? Do you have other devices that have successfully simulated?
Can confirm having this same issue still on latest build from last night.
@Aibolit78 @WeiXiaoBlueRabbit @sercanarga Have any of you had any luck?
----@debian:~/PCILeechGen$ sudo ./bin/pcileechgen check --bdf 0000:03:00.0 Checking device 0000:03:00.0...
[OK] Device found: 10ec:8161 Ethernet controller [OK] Config space readable: 4096 bytes [OK] IOMMU is enabled [OK] VFIO modules loaded [OK] IOMMU group: 10 [OK] Device is alone in its IOMMU group [OK] Power state: D0 (active) [OK] Already bound to vfio-pci
Capabilities (5): [01] Power Management at offset 0x40 [05] MSI at offset 0x50 [10] PCI Express at offset 0x70 [11] MSI-X at offset 0xb0 [03] Vital Product Data at offset 0xd0
Extended Capabilities (5): [0001] Advanced Error Reporting at offset 0x100 [0002] Virtual Channel (No MFVC) at offset 0x140 [0003] Device Serial Number at offset 0x160 [0018] Latency Tolerance Reporting at offset 0x170 [001e] L1 PM Substates at offset 0x178
BARs: BAR0: io at 0x3000, size 256 B BAR2: mem64 at 0x81104000, size 4 KB BAR4: mem64 at 0x81100000, size 16 KB
--- Board Compatibility --- Donor Link: Gen1 (2.5 GT/s) x1 Donor DSN: 0x01000000684CE000
Compatible boards: [OK] PCIeSquirrel xc7a35tfgg484-2 x1 (exact match) [OK] ScreamerM2 xc7a35tcsg325-2 x1 (exact match) [OK] pciescreamer xc7a35tfgg484-2 x1 (exact match) [OK] EnigmaX1 xc7a75tfgg484-2 x1 (exact match) [OK] CaptainDMA_M2_x1 xc7a35tcsg325-2 x1 (exact match) [OK] CaptainDMA_M2_x4 xc7a35tcsg325-2 x4 [OK] CaptainDMA_35T xc7a35tfgg484-2 x1 (exact match) [OK] CaptainDMA_75T xc7a75tfgg484-2 x1 (exact match) [OK] CaptainDMA_100T xc7a100tfgg484-2 x1 (exact match) [OK] ZDMA xc7a100tfgg484-2 x4 [OK] GBOX xc7a35tfgg484-2 x1 (exact match) [OK] NeTV2_35T xc7a35tfgg484-2 x1 (exact match) [OK] NeTV2_100T xc7a100tfgg484-2 x1 (exact match) [OK] ac701_ft601 xc7a200tfbg676-2 x4 [OK] acorn xc7a200tfbg484-3 x4 [OK] litefury xc7a100tfgg484-2 x4 [OK] sp605_ft601 xc6slx45tfgg484-2 x1 (exact match)
Total: 17 boards
--- Summary --- [OK] Device is ready for firmware generation alex@debian:~/PCILeechGen$ sudo ./bin/pcileechgen build --bdf 0000:03:00.0 --board PCIeSquirrel 2026/04/21 00:50:59 INFO target device bdf=0000:03:00.0 2026/04/21 00:50:59 INFO collecting donor device data 2026/04/21 00:50:59 WARN sysfs BAR read returned all 0xFF bar=2 2026/04/21 00:50:59 INFO BAR read complete bar=2 bytes=4096 2026/04/21 00:50:59 WARN sysfs BAR read returned all 0xFF bar=4 2026/04/21 00:50:59 INFO BAR read complete bar=4 bytes=4096 2026/04/21 00:50:59 INFO PCI memory space enabled bdf=0000:03:00.0 2026/04/21 00:50:59 WARN sysfs BAR read returned all 0xFF bar=2 2026/04/21 00:50:59 INFO BAR read complete bar=2 bytes=4096 2026/04/21 00:50:59 WARN sysfs BAR read returned all 0xFF bar=4 2026/04/21 00:50:59 INFO BAR read complete bar=4 bytes=4096 2026/04/21 00:50:59 INFO all memory BAR contents are 0xFF, attempting native driver rebind cycle 2026/04/21 00:50:59 INFO waiting for native driver to initialize device... delay=5s 2026/04/21 00:51:04 WARN native driver rebind: BAR read failed bar=2 error="failed to read BAR2 content: read /sys/bus/pci/devices/0000:03:00.0/resource2: input/output error" 2026/04/21 00:51:04 INFO native driver rebind: retrying BAR reads attempt=1 max=3 2026/04/21 00:51:05 WARN native driver rebind: BAR read failed bar=2 error="failed to read BAR2 content: read /sys/bus/pci/devices/0000:03:00.0/resource2: input/output error" 2026/04/21 00:51:05 INFO native driver rebind: retrying BAR reads attempt=2 max=3 2026/04/21 00:51:06 WARN native driver rebind: BAR read failed bar=2 error="failed to read BAR2 content: read /sys/bus/pci/devices/0000:03:00.0/resource2: input/output error" 2026/04/21 00:51:06 INFO native driver rebind: retrying BAR reads attempt=3 max=3 2026/04/21 00:51:07 WARN native driver rebind: BAR read failed bar=2 error="failed to read BAR2 content: read /sys/bus/pci/devices/0000:03:00.0/resource2: input/output error" 2026/04/21 00:51:08 WARN native driver rebind cycle did not recover any BAR data 2026/04/21 00:51:08 INFO BAR profiling skipped: content is all 0xFF bar=2 2026/04/21 00:51:08 INFO BAR profiling skipped: content is all 0xFF bar=4 2026/04/21 00:51:08 INFO MSI-X detected vectors=4 table_bar=4 table_offset=0x0 pba_bar=4 pba_offset=0x800 2026/04/21 00:51:08 WARN BAR content is all 0xFF - device may be inaccessible or in D3 power state bar=2 bytes=4096 class=0x020000 2026/04/21 00:51:08 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:
- Try: sudo setpci -s 0000:03:00.0 COMMAND=0x06
- 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 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:
- Try: sudo setpci -s 0000:03:00.0 COMMAND=0x06
- For CNVi/WiFi: boot with native driver, dump BAR with a tool, then use --from-json ----@debian:~/PCILeechGen$
Everything seems OK but it fails
this should be improved now. the root cause is that rtl8168/rtl8161 devices drop into d3hot whenever config space is touched, even just enabling memory space or going through a vfio rebind cycle. in d3hot the pcie spec says bars must return 0xff, so the reads were correct, the device just was not being woken back up.
three changes: d0 wake is now called after enablememoryspace writes to config space, after the native driver rebind cycle the device is woken to d0 and power state is verified and logged, and memory space settle delay went from 100ms to 200ms since rtl8168h needs extra phy readiness time after d3 to d0.
if you can still test this pull the latest and give it a try. the realtek chips are tricky because the phy needs driver level init that vfio pci cannot do, so if it still fails the from json path is the escape hatch.