Increase PCIe BAR Size

Hello, can you help me to locate the proper file to update, to increase the PCIe BAR size for the BPI-M4? Thanks!

[    2.189746] [RTD139x PCIE] 98060000.pcie: PCIE host driver initial begin.
[    2.189777] [RTD139x PCIE] 98060000.pcie: Speed Mode: GEN1
[    2.189804] [RTD139x PCIE] 98060000.pcie: PCIE Debug Mode on
[    2.366583] [RTD139x PCIE] 98060000.pcie: PCIE device has link up in slot 2
[    2.366615] OF: PCI: host bridge /pcie@98060000 ranges:
[    2.366657] OF: PCI:   MEM 0x98062000..0x9807ffff -> 0x98062000
[    2.366688] OF: PCI:    IO 0x00030000..0x0003ffff -> 0x00030000
[    2.366906] [RTD139x PCIE] 98060000.pcie: PCI host bridge to bus 0000:01
[    2.366940] pci_bus 0000:01: root bus resource [bus 00-ff]
[    2.366967] pci_bus 0000:01: root bus resource [mem 0x98062000-0x9807ffff]
[    2.366997] pci_bus 0000:01: root bus resource [io  0x0000-0xffff] (bus address [0x30000-0x3ffff])
[    2.368105] pci 0000:01:00.0: [10de:0a65] type 00 class 0x030000
[    2.369074] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00ffffff]
[    2.369830] pci 0000:01:00.0: reg 0x14: [mem 0x00000000-0x0fffffff 64bit pref]
[    2.370592] pci 0000:01:00.0: reg 0x1c: [mem 0x00000000-0x01ffffff 64bit pref]
[    2.371043] pci 0000:01:00.0: reg 0x24: initial BAR value 0x00000000 invalid
[    2.371071] pci 0000:01:00.0: reg 0x24: [io  size 0x0080]
[    2.371512] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0007ffff pref]
[    2.377065] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=none,locks=none
[    2.377197] pci 0000:01:00.0: BAR 1: no space for [mem size 0x10000000 64bit pref]
[    2.377236] pci 0000:01:00.0: BAR 1: failed to assign [mem size 0x10000000 64bit pref]
[    2.377277] pci 0000:01:00.0: BAR 3: no space for [mem size 0x02000000 64bit pref]
[    2.377313] pci 0000:01:00.0: BAR 3: failed to assign [mem size 0x02000000 64bit pref]
[    2.377351] pci 0000:01:00.0: BAR 0: no space for [mem size 0x01000000]
[    2.377379] pci 0000:01:00.0: BAR 0: failed to assign [mem size 0x01000000]
[    2.377409] pci 0000:01:00.0: BAR 6: no space for [mem size 0x00080000 pref]
[    2.377438] pci 0000:01:00.0: BAR 6: failed to assign [mem size 0x00080000 pref]
[    2.377476] pci 0000:01:00.0: BAR 5: assigned [io  0x1000-0x107f]
[    2.378309] [RTD139x PCIE] 98060000.pcie: PCIE host driver initial done.

you can see here:

by the way: what card does you want to pick up, please give us more information ,we can ask my R&D do some test

Thank you for your reply! I did notice this device tree file, and I do think that it might be the proper place to make edits, but, I am unsure what values to change here??

If you could check with your R&D engineer, that would excellent!

I am attempting to run an old GPU, to use for 2D acceleration and small machine learning.

It is a 512mb of memory Nvidia GeForce 210 card. But, I could go even smaller and probably use a 128mb or 256mb memory card if necessary.

Thank you very much for helping!

Hello @sinovoip, just wondering if you had any update from your R&D engineer? Any information on which values to change in that .dtsi file?

Thanks again! David

Just a followup on this thread, for anyone who may be interested.

The card is attached to the Banana Pi M4 board with a PCIe adapter that includes a power input, so the card is actually powered up and even recognized by the operating system:

root@bpi-iot-ros-ai:/mnt/bananapi/bpi-m4/linux# lspci -v
01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2) (prog-if 00 [VGA controller])
        Subsystem: Corp. GT218 [GeForce 210]
        Flags: fast devsel
        Memory at <unassigned> (64-bit, prefetchable) [disabled]
        Memory at <unassigned> (64-bit, prefetchable) [disabled]
        I/O ports at 1000 [disabled] [size=128]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Capabilities: [b4] Vendor Specific Information: Len=14 <?>
        Capabilities: [100] Virtual Channel
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>

The power input is using a standard PC power supply, 12v connection. The fan on the card spins, but, due to the kernel error listed in the first post, the card is not properly initialized. If anyone has ideas, that would be very helpful, thanks!

1 Like