On 07/08/11 17:09, Gerd Hoffmann wrote:
Hmm but within a bridge we allocate down to top, right?
Yes. Just the big mem and prefmem blocks which contain everything are allocated top-down, exactly to avoid fragmenting the memory by moving stuff as far as possible to the top of the address space, leaving a big hole between end of guest ram and start of pci allocations.
Within the memory blocks the bars (and bridge windows) are allocated bottom-up, sorted by size, with no alignment holes between the bars.
Pushed latest bits to http://www.kraxel.org/cgit/seabios/log/?h=pci.4 for those who want to play with it. Will post updated series to the list next week.