Open EmhyrVarEmreis opened 10 months ago
Apologies for the slow answer.
First you'd have to check out if you have DMA access working at all.
I'd recommend using PCILeech for this. pcileech -device fpga -v display -min 0x1000
is it successful? If not try to shut down the target computer and start it again. Read again after that.
For additional info you may use: pcileech -device fpga -v display -min 0x1000 -vvv
If DMA is working you might require a memory map of the target system, especially if the target system is AMD-based. https://github.com/ufrisk/LeechCore/wiki/Device_FPGA_AMD_Thunderbolt
Let me know if this helps.
Did you resolve this issue or is it still not working?
Sorry, but I have not had time recently to come back to this problem but I still intend to investigate it
Issue still exists
On fresh start I got correct results with no errors reading memory with display pcileech -device fpga -v display -min 0x1000 -vvv
But when tried with Python API I got an error (same as in Java):
[+] using FTDI device: 0403:601f (bus 2, device 3)
[+] FTDIFTDI SuperSpeed-FIFO Bridge000000000001
[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output ErrorTraceback (most recent call last):
File "/home/emhyr/hacking/test.py", line 4, in <module>
vmm = memprocfs.Vmm(['-device', 'fpga'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Vmm.init(): Initialization of vmm failed.
Then pcileech -device fpga -v display -min 0x1000 -vvv
gives:
[+] using FTDI device: 0403:601f (bus 2, device 3)
[+] FTDIFTDI SuperSpeed-FIFO Bridge000000000001
[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output Error[-] bulk transfer error: Input/Output ErrorDEVICE: FPGA: ERROR: Unable to connect to FPGA device [0,v0.0,0000]
PCILEECH: Failed to connect to the device.
until I restart target computer or wait some time (several minutes).
RPi5 is on Ubuntu 22.04.3 LTS, freeshly updated
hm, I'd have to check this out on my RPi5 to see if I can replicate the issue. Hopefully in the weekend.
It very much looks like some libusb error though. If there is an issue with libusb or the underlying hardware / drivers there isn't really anything this project can do about unfortunately.
But I'll take a look at least :)
MemProcFS v5.8.20 Defice: fpga Target system: Windows 11 Reading from rpi5
First I am getting:
But when I call
vmm.processGet
it fails withvmm.VmmException: Native call to vmm failed!
How to debug? What should I check?