PCILeechGen icon indicating copy to clipboard operation
PCILeechGen copied to clipboard

An invalid parameter was passed to a service or function.

Open sthgi opened this issue 8 months ago • 2 comments

your device_context.json has no bar contents. the xhci driver reads critical registers from bar0 at init and when they're all zero it fails with code 10.

i fixed this case, the collector now errors out instead of silently skipping. please make sure vfio is loaded before using the tool and re-collect your donor:

sudo modprobe vfio && sudo modprobe vfio-pci
Image

device_context.json

vivado.log

I ran sudo modprobe vfio && sudo modprobe vfio-pci

I always get this in the log: [donor] Warning: could not read BAR0 content: failed to read BAR0 content: read /sys/bus/pci/devices/0000:03:00.0/resource0: input/output error

sthgi avatar Mar 05 '26 15:03 sthgi

that error means the device is still bound to its native driver. you need to unbind it first, then bind to vfio-pci:

# unload vfio modules first
sudo modprobe vfio && sudo modprobe vfio-pci

# unbind from current driver
echo "0000:03:00.0" | sudo tee /sys/bus/pci/devices/0000:03:00.0/driver/unbind

# tell vfio-pci to claim this vendor:device
echo "1912 0014" | sudo tee /sys/bus/pci/drivers/vfio-pci/new_id

# now re-run the tool

if the device is a usb controller with active devices plugged in, unplug them first or the unbind may fail. this issue will be closed as it is not related to the codebase.

sercanarga avatar Mar 05 '26 16:03 sercanarga

that error means the device is still bound to its native driver. you need to unbind it first, then bind to vfio-pci:

unload vfio modules first

sudo modprobe vfio && sudo modprobe vfio-pci

unbind from current driver

echo "0000:03:00.0" | sudo tee /sys/bus/pci/devices/0000:03:00.0/driver/unbind

tell vfio-pci to claim this vendor:device

echo "1912 0014" | sudo tee /sys/bus/pci/drivers/vfio-pci/new_id

now re-run the tool

if the device is a usb controller with active devices plugged in, unplug them first or the unbind may fail. this issue will be closed as it is not related to the codebase.

device_context.json

vivado.log

Should I give up on this device and try something else? Soundcard, ethernet, wifi etc?

sthgi avatar Mar 05 '26 17:03 sthgi