Tool/software: Linux
Team,
A customer of mine has issues to get PCIe RC correctly working on his own board. On the PCIe bus there is a FPGA which should get enumerated. But during Linux boot there are PCIe errors:
[ 0.388807] libphy: mdio_driver_register: phy-bcm-ns2-pci
[ 0.390024] pinctrl-single 4a003400.pinmux: 282 pins at pa fc003400 size 1128
[ 0.398809] OF: PCI: host bridge /ocp/axi@0/pcie@51000000 ranges:
[ 0.398819] OF: PCI: No bus range found for /ocp/axi@0/pcie@51000000, using [bus 00-ff]
[ 0.398845] OF: PCI: IO 0x20003000..0x20012fff -> 0x00000000
[ 0.398861] OF: PCI: MEM 0x20013000..0x2fffffff -> 0x20013000
[ 0.499853] dra7-pcie 51000000.pcie: link up
[ 0.499992] dra7-pcie 51000000.pcie: PCI host bridge to bus 0000:00
[ 0.500002] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.500011] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 0.500018] pci_bus 0000:00: root bus resource [mem 0x20013000-0x2fffffff]
[ 0.500382] PCI: bus0: Fast back to back transfers disabled
[ 0.500709] pci 0000:01:00.0: [Firmware Bug]: reg 0x1c: invalid BAR (can't size)
[ 0.500742] pci 0000:01:00.0: [Firmware Bug]: reg 0x20: invalid BAR (can't size)
[ 0.500774] pci 0000:01:00.0: [Firmware Bug]: reg 0x24: invalid BAR (can't size)
[ 0.513841] PCI: bus1: Fast back to back transfers disabled
[ 0.513898] irq: no irq domain found for /ocp/axi@0/pcie@51000000/interrupt-controller !
[ 0.513942] irq: no irq domain found for /ocp/axi@0/pcie@51000000/interrupt-controller !
[ 0.513981] pci 0000:00:00.0: BAR 8: assigned [mem 0x24000000-0x2fffffff]
[ 0.513990] pci 0000:00:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff]
[ 0.514001] pci 0000:00:00.0: BAR 1: assigned [mem 0x20020000-0x2002ffff]
[ 0.514014] pci 0000:01:00.0: BAR 0: assigned [mem 0x28000000-0x2fffffff]
[ 0.514033] pci 0000:01:00.0: BAR 1: assigned [mem 0x24000000-0x24ffffff]
[ 0.514051] pci 0000:01:00.0: BAR 2: assigned [mem 0x25000000-0x251fffff]
[ 0.514070] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 0.514079] pci 0000:00:00.0: bridge window [mem 0x24000000-0x2fffffff]
[ 0.514276] pcieport 0000:00:00.0: Signaling PME through PCIe PME interrupt
[ 0.514285] pci 0000:01:00.0: Signaling PME through PCIe PME interrupt
[ 0.514732] OF: PCI: host bridge /ocp/axi@1/pcie@51800000 ranges:
[ 0.514740] OF: PCI: No bus range found for /ocp/axi@1/pcie@51800000, using [bus 00-ff]
[ 0.514763] OF: PCI: IO 0x30003000..0x30012fff -> 0x00000000
[ 0.514779] OF: PCI: MEM 0x30013000..0x3fffffff -> 0x30013000
[ 1.515920] dra7-pcie 51800000.pcie: phy link never came up
[ 1.516055] dra7-pcie 51800000.pcie: PCI host bridge to bus 0001:00
What might cause such a "invalid BAR" error message?
When doing a "lspci", the Mem bit is not set:
root@beaglebone:~# lspci -s 01:00.0 -vv
0000:01:00.0 Bridge: xxxxxxxxx
Subsystem: Device 00d8:5a91
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-
Interrupt: pin A routed to IRQ 0
Region 0: Memory at 28000000 (32-bit, non-prefetchable) [disabled] [size=128M]
Region 1: Memory at 24000000 (32-bit, non-prefetchable) [disabled] [size=16M]
Region 2: Memory at 25000000 (32-bit, non-prefetchable) [disabled] [size=2M]
Region 3: I/O ports at <ignored> [disabled]
Region 4: I/O ports at <ignored> [disabled]
Region 5: I/O ports at <ignored> [disabled]
Capabilities: [50] MSI: Enable- Count=1/4 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
...
lspci: Unable to load libkmod resources: error -12
But when manually setting the mem bit, the FPGA can be accessed via PCIe.Could this be a Linux Kernel config issue (mem bit not set)?
Thanks,
Robert