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?