top | item 43296267

(no title)

offmycloud | 1 year ago

Just to be clear, it is not the Base Address Register (BAR) itself that gets resized, it is the mapped region of video memory which is pointed to by the BAR.

discuss

order

toast0|1 year ago

I'm not sure what you're saying?

When I think of the BAR, I think of how the OS uses it. Read the address (32 or 64 bits as the case may be), write the flag so the card is not active, write all 1s to the BAR, read the address which tells you how big the mapped region is (the adress will be 0s for bits that are within the mapped region), write back the original address, and finally re-enable the card.

Resizable bar doesn't change the bar from a 32-bit bar to a 64-bit bar, it just changes the number of bits used in the mapped region.

But if the os firmware mapped the gpu somewhere where there's no room to expand the bar, the OS shouldn't expand it.

fc417fc802|11 months ago

> But if the os firmware mapped the gpu somewhere where there's no room to expand the bar, the OS shouldn't expand it.

Is there some reason the kernel can't remap devices after the fact? Why is the firmware involved in this once the kernel takes over?