I have an FPGA card attached to PCIe on a Linux system. I can re-program the FPGA and then echo 1 > /sys/bus/pci/rescan
and my card shows up in lspci
.
However the BAR regions aren't allocated any memory:
Region 0: Memory at <unassigned> (64-bit, prefetchable) [disabled] [size=32M]
Region 2: Memory at <unassigned> (64-bit, prefetchable) [disabled] [size=64M]
I've tried various pci=
flags on the Linux boot command line without much effect.
My suspicion is that the BAR regions are too big and therefore Linux is unable to find an appropriately aligned range in the address space to map the BARs, since they weren't present at boot.
Is this a correct theory? Is it possible to tell Linux to reserve space for my device?