I have a Xilinx FPGA pcie card (vcu1525) and programmed it to have 2 BAR which defines 64KB and 4MB memory spaces.
02:00.0 Serial controller: Xilinx Corporation Device 903f (prog-if 01 [16450])
Subsystem: Xilinx Corporation Device 0007
Physical Slot: 4
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 26
Region 0: Memory at ee400000 (32-bit, non-prefetchable) [size=64K]
Region 1: Memory at ee000000 (32-bit, non-prefetchable) [size=4M]
I also can see memory hierarchy at /proc/iomem.
90000000-f7ffbfff : PCI Bus 0000:00
ee000000-f20fffff : PCI Bus 0000:02
ee000000-ee3fffff : 0000:02:00.0
ee000000-ee3fffff : xdma
ee400000-ee40ffff : 0000:02:00.0
ee400000-ee40ffff : xdma
But when I change the second BAR to have 1GB size, xdma driver throws an error. This is a part of the dmesg output.
[16608.863027] pci 0000:02:00.0: [10ee:903f] type 00 class 0x070001
[16608.863065] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x0000ffff]
[16608.863074] pci 0000:02:00.0: reg 0x14: [mem 0x00000000-0x3fffffff]
[16608.863112] pci 0000:02:00.0: Max Payload Size set to 256 (was 128, max 1024)
[16608.867923] xdma:xdma_mod_init: Xilinx XDMA Reference Driver xdma v2017.1.47
[16608.867930] xdma:xdma_mod_init: desc_blen_max: 0xfffffff/268435455, sgdma_timeout: 10 sec.
[16608.870517] pci 0000:02:00.0: BAR 1: no space for [mem size 0x40000000]
[16608.870524] pci 0000:02:00.0: BAR 1: failed to assign [mem size 0x40000000]
[16608.870529] pci 0000:02:00.0: BAR 0: assigned [mem 0xee000000-0xee00ffff]
[16608.870540] ast 0000:08:00.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[16608.870633] serial 0000:02:00.0: enabling device (0100 -> 0102)
[16608.870880] xdma:xdma_device_open: xdma device 0000:02:00.0, 0xffff882031e43000.
[16608.871018] xdma:map_single_bar: BAR0 at 0xee000000 mapped at 0xffffc9000d0a0000, length=65536(/65536)
So my questions are
I enabled above 4G decoding option in BIOS.
It would be great help if you could help me out.
User contributions licensed under CC BY-SA 3.0