How does one figure out what to use for "32-bit BAR Space Preferred Size" to allow for live-adding of devices?
markmi opened this issue · 1 comments
How does one figure out what to use for "32-bit BAR Space Preferred Size" to allow for live-adding of devices after booting?
Could there be a way to see the size for an example "all possible pre-connected" boot to later enter for planned live connections of some subset of that configuration?
I'm guessing rule(s) of thumb are needed that will generally over-allocate by some amount instead of being minimal.
(Note: I'm not likely to connect PCIe devices after booting for the foreseeable future. But the question just seemed to stand out on seeing the field and its description.)
RPi's PCIe does not support hot-plugging, but you can force a bus rescan in Windows (refresh Device Manager) and Linux (echo 1 > /sys/bus/pci/rescan
), that's the only reason behind this option. It tends to go wrong when removing devices, so it should be avoided.
I'm guessing rule(s) of thumb are needed that will generally over-allocate by some amount instead of being minimal.
Yeah, that's the idea. If (hypothetically) you connect a device after boot, rescan, and it fails to allocate 32-bit BARs, then the space can be increased.
UEFI will reserve 5 MB at all times since this is what RP1 wants. Generally 32-bit BARs tend to be small and well below that size (unless you use switches with multiple endpoints..), so realistically there's no need to ever touch that setting.