Can pcie non-prefetchable memory be larger for bigger pcie devices?

I’d like to use a gpu on vim3, but the bar size is too small to assigned.

[    0.574457] pci 0000:00:00.0: BAR 9: no space for [mem size 0x06000000 pref]
[    0.574468] pci 0000:00:00.0: BAR 9: failed to assign [mem size 0x06000000 pref]
[    0.574472] pci 0000:00:00.0: BAR 8: assigned [mem 0xfd000000-0xfdffffff]
[    0.574476] pci 0000:00:00.0: BAR 6: assigned [mem 0xfc700000-0xfc70ffff pref]
[    0.574483] pci 0000:01:00.0: BAR 4: no space for [mem size 0x04000000 64bit pref]
[    0.574486] pci 0000:01:00.0: BAR 4: failed to assign [mem size 0x04000000 64bit pref]
[    0.574489] pci 0000:01:00.0: BAR 2: assigned [mem 0xfd000000-0xfdffffff 64bit]
[    0.574515] pci 0000:01:00.0: BAR 0: no space for [mem size 0x00020000 64bit pref]
[    0.574518] pci 0000:01:00.0: BAR 0: failed to assign [mem size 0x00020000 64bit pref]
[    0.574522] pci 0000:00:00.0: PCI bridge to [bus 01-ff]

And then I move the range of non-prefetchable memory backward.

# from this
0x82000000 0 0xfca00000 0x0 0xfca00000 0 0x1600000
# to this
0x82000000 0 0xf2000000 0x0 0xf2000000 0 0xA000000

And then the bars are able to assign.

[    0.554297] pci 0000:00:00.0: BAR 9: assigned [mem 0xee000000-0xf3ffffff pref]
[    0.554310] pci 0000:00:00.0: BAR 8: assigned [mem 0xf4000000-0xf4ffffff]
[    0.554316] pci 0000:00:00.0: BAR 6: assigned [mem 0xed900000-0xed90ffff pref]
[    0.554325] pci 0000:01:00.0: BAR 4: assigned [mem 0xf0000000-0xf3ffffff 64bit pref]
[    0.554356] pci 0000:01:00.0: BAR 2: assigned [mem 0xf4000000-0xf4ffffff 64bit]
[    0.554385] pci 0000:01:00.0: BAR 0: assigned [mem 0xee000000-0xee01ffff 64bit pref]

But the values read from them are corrupt, is it because I assigned the wrong memory? But I can’t see any allocation in that addresses in /proc/iomem

Is there anyway to get a larger pcie non-prefetchable memory?

@numbqq, @Frank

this is /proc/iomem
Can we move the whole pcie part from fc000000 to f0000000 to get a larger memory for devices?

05300000-ed7fffff : System RAM
  1ffe9000-1fffdfff : reserved
  7ec7c000-7f7fffff : reserved
  afd70000-b3ffffff : reserved
  b400e000-b400efff : reserved
  b4011000-b4011fff : reserved
  b4012000-b4014fff : reserved
  b4015000-b4025fff : reserved
  b4026000-ed7fffff : reserved
f2000000-fbffffff : pcie@fc000000
  f2000000-f7ffffff : PCI Bus 0000:01
    f2000000-f201ffff : 0000:01:00.0
    f4000000-f7ffffff : 0000:01:00.0
  f8000000-f8ffffff : PCI Bus 0000:01
    f8000000-f8ffffff : 0000:01:00.0
  f9000000-f900ffff : 0000:00:00.0
fc000000-fc3fffff : fc000000.pcie elbi
fc400000-fc5fffff : fc000000.pcie config
ff100000-ff11ffff : galcore register region
ff3f0000-ff3fffff : ff3f0000.ethernet ethernet@ff3f0000

@Frank @numbqq can you help me with this