bar_contents value is missing and device data collection failed
Description
I tried using the Intel ax201 and the RTL8111/8168/8411 (Realtek Gaming family controller). The bdf for ax201 is 0000:00:14.3, and the bdf for Realtek is 0000:08:00.0. When I used the check command on ax201, I got the following results, and the bar_contents value is missing. However, if I use QEMU+Win10 to trace memory, I can capture the contents of vfio_region_write and vfio_region_read.:
`
sudo ./bin/pcileechgen check --bdf 0000:00:14.3
Checking device 0000:00:14.3...
[OK] Device found: 8086:06f0 Network controller [OK] Config space readable: 4096 bytes [OK] IOMMU is enabled [OK] VFIO modules loaded [OK] IOMMU group: 6 [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 0xc8 [05] MSI at offset 0xd0 [10] PCI Express at offset 0x40 [11] MSI-X at offset 0x80
Extended Capabilities (2): [0018] Latency Tolerance Reporting at offset 0x100 [000b] Vendor Specific at offset 0x164
BARs: BAR0: mem64 at 0xb2598000, size 16 KB
--- Board Compatibility --- Donor Link: Unknown (0) x0 [WARN] Donor has no DSN capability (serial number won't be emulated)
Compatible boards: [OK] PCIeSquirrel xc7a35tfgg484-2 x1 [OK] ScreamerM2 xc7a35tcsg325-2 x1 [OK] pciescreamer xc7a35tfgg484-2 x1 [OK] EnigmaX1 xc7a75tfgg484-2 x1 [OK] CaptainDMA_M2_x1 xc7a35tcsg325-2 x1 [OK] CaptainDMA_M2_x4 xc7a35tcsg325-2 x4 [OK] CaptainDMA_35T xc7a35tfgg484-2 x1 [OK] CaptainDMA_75T xc7a75tfgg484-2 x1 [OK] CaptainDMA_100T xc7a100tfgg484-2 x1 [OK] ZDMA xc7a100tfgg484-2 x4 [OK] GBOX xc7a35tfgg484-2 x1 [OK] NeTV2_35T xc7a35tfgg484-2 x1 [OK] NeTV2_100T xc7a100tfgg484-2 x1 [OK] ac701_ft601 xc7a200tfbg676-2 x4 [OK] acorn xc7a200tfbg484-3 x4 [OK] litefury xc7a100tfgg484-2 x4 [OK] sp605_ft601 xc6slx45tfgg484-2 x1
Total: 17 boards
--- Summary ---
[OK] Device is ready for firmware generation
and then i using the build command:
sudo ./bin/pcileechgen build --bdf 0000:00:14.3 --board CaptainDMA_75T --skip-vivado
2026/03/09 15:59:20 INFO target device bdf=0000:00:14.3
2026/03/09 15:59:20 INFO collecting donor device data
2026/03/09 15:59:20 INFO BAR read complete bar=0 bytes=4096
2026/03/09 15:59:20 INFO BAR profiled bar=0 active_registers=1024
2026/03/09 15:59:20 INFO MSI-X detected vectors=16 table_bar=0 table_offset=0x2000 pba_bar=0 pba_offset=0x3000
2026/03/09 15:59:20 WARN BAR content is all 0xFF — device may be inaccessible or in D3 power state bar=0 bytes=4096 class=0x028000
2026/03/09 15:59:20 INFO build target board=CaptainDMA_75T fpga=xc7a75tfgg484-2 output=pcileech_datastore
2026/03/09 15:59:20 INFO donor device vendor=8086 device=06f0 class="Network controller" revision=00
2026/03/09 15:59:20 INFO config space bytes=4096 std_caps=4 ext_caps=2 bars=6 bars_with_content=1
2026/03/09 15:59:20 INFO generating firmware artifacts
2026/03/09 15:59:20 INFO config space scrubbed modifications=8
2026/03/09 15:59:20 INFO SV patches applied summary=" pcileech_fifo.sv:\n -> Shadow config space: ENABLED (CFGTLP ZERO DATA -> 0)\n -> CFG_SUBSYS_VEND_ID: 0x8086\n -> CFG_SUBSYS_ID: 0x0074\n -> CFG_VEND_ID: 0x8086\n -> CFG_DEV_ID: 0x06F0\n -> CFG_REV_ID: 0x00\n -> _pcie_core_config: all IDs updated\n"
2026/03/09 15:59:20 INFO BAR selection for SV codegen bar_index=0 bar_size=4096 has_profile=true
2026/03/09 15:59:20 WARN BAR probe data unreliable (all registers report fully writable), falling back to spec-based model probes=1024
2026/03/09 15:59:20 INFO SV modules generated features="MSI-X 16 vectors, 13 registers, latency emulator, interrupt controller"
2026/03/09 15:59:20 INFO build manifest written files=26
2026/03/09 15:59:20 INFO artifacts written dir=pcileech_datastore
2026/03/09 15:59:20 INFO artifact file=device_context.json
2026/03/09 15:59:20 INFO artifact file=pcileech_cfgspace.coe
2026/03/09 15:59:20 INFO artifact file=pcileech_cfgspace_writemask.coe
2026/03/09 15:59:20 INFO artifact file=pcileech_bar_zero4k.coe
2026/03/09 15:59:20 INFO artifact file=vivado_generate_project.tcl
2026/03/09 15:59:20 INFO artifact file=vivado_build.tcl
2026/03/09 15:59:20 INFO artifact file=src/
2026/03/09 15:59:20 INFO artifact file=pcileech_bar_impl_device.sv
2026/03/09 15:59:20 INFO artifact file=pcileech_tlps128_bar_controller.sv
2026/03/09 15:59:20 INFO artifact file=pcileech_msix_table.sv
2026/03/09 15:59:20 INFO artifact file=pcileech_nvme_admin_responder.sv
2026/03/09 15:59:20 INFO artifact file=pcileech_nvme_dma_bridge.sv
2026/03/09 15:59:20 INFO artifact file=tlp_latency_emulator.sv
2026/03/09 15:59:20 INFO artifact file=device_config.sv
2026/03/09 15:59:20 INFO artifact file=config_space_init.hex
2026/03/09 15:59:20 INFO artifact file=msix_table_init.hex
2026/03/09 15:59:20 INFO artifact file=scrub_diff_report.txt
2026/03/09 15:59:20 INFO artifact file=build_manifest.json
2026/03/09 15:59:20 INFO Vivado synthesis skipped
However, I noticed that the bar_contents value in the generated device_context.json is missing. And it displays code 10 on Windows. So I tried the wired network card RTL8111/8168/8411, and got the output using the check command:
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 `
But when I use the build command, an error occurs: ` sudo ./bin/pcileechgen build --bdf 0000:08:00.0 --board CaptainDMA_75T --skip-vivado 2026/03/09 15:58:03 INFO target device bdf=0000:08:00.0 2026/03/09 15:58:03 INFO collecting donor device data 2026/03/09 15:58:04 INFO BAR read complete bar=2 bytes=4096 2026/03/09 15:58:04 INFO BAR read complete bar=4 bytes=4096 2026/03/09 15:58:04 INFO BAR profiled bar=2 active_registers=1024 2026/03/09 15:58:04 INFO BAR profiled bar=4 active_registers=1024 2026/03/09 15:58:04 INFO MSI-X detected vectors=4 table_bar=4 table_offset=0x0 pba_bar=4 pba_offset=0x800 2026/03/09 15:58:04 WARN BAR content is all 0xFF — device may be inaccessible or in D3 power state bar=2 bytes=4096 class=0x020000 2026/03/09 15:58:04 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 • VFIO cannot access the device memory region Without valid BAR data, Windows will produce Code 10 and DMA will not work 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 • VFIO cannot access the device memory region Without valid BAR data, Windows will produce Code 10 and DMA will not work `
Error Type
Build/generation failure
Device Context File
Not generated
Windows Event Log
Device Manager Error Details
No response
Terminal Output
`
sudo ./bin/pcileechgen build --bdf 0000:08:00.0 --board CaptainDMA_75T --skip-vivado
2026/03/09 15:58:03 INFO target device bdf=0000:08:00.0
2026/03/09 15:58:03 INFO collecting donor device data
2026/03/09 15:58:04 INFO BAR read complete bar=2 bytes=4096
2026/03/09 15:58:04 INFO BAR read complete bar=4 bytes=4096
2026/03/09 15:58:04 INFO BAR profiled bar=2 active_registers=1024
2026/03/09 15:58:04 INFO BAR profiled bar=4 active_registers=1024
2026/03/09 15:58:04 INFO MSI-X detected vectors=4 table_bar=4 table_offset=0x0 pba_bar=4 pba_offset=0x800
2026/03/09 15:58:04 WARN BAR content is all 0xFF — device may be inaccessible or in D3 power state bar=2 bytes=4096 class=0x020000
2026/03/09 15:58:04 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
• VFIO cannot access the device memory region
Without valid BAR data, Windows will produce Code 10 and DMA will not work
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
• VFIO cannot access the device memory region
Without valid BAR data, Windows will produce Code 10 and DMA will not work
`
thanks for reporting this with such detailed output!
the problem is that when a device gets bound to vfio-pci, the pci command register doesn't have memory space and bus master bits enabled. so when we try to read the bars, everything comes back as 0xff.
i've pushed a fix that automatically enables these bits before reading bars. this should take care of your rtl8168 case. if it still gives you trouble, you can also try sudo setpci -s 0000:08:00.0 COMMAND=0x06 before running the build.
for the intel ax201, the situation is a bit different. that's a cnvi (integrated wifi) device sitting under the xhci controller at 00:14.0. its bar memory only has meaningful content when the iwlwifi driver is loaded and has uploaded firmware. no amount of register poking will fix that one. your best bet is to capture the device data while the native driver is running, then feed it to pcileechgen with --from-json.
the error messages now also include these hints so future users don't have to dig around for answers.