[SeaBIOS] PCI regions mapping problem

Stas Sergeev stsp at list.ru
Fri Apr 21 22:59:16 CEST 2017


21.04.2017 09:59, Gerd Hoffmann пишет:
> On Do, 2017-04-20 at 01:18 +0300, Stas Sergeev wrote:
>> Hello.
>>
>> I tried seabios on an emulator (not qemu) and
>> faced the PCI memory regions overlap.
>> After some debugging I came to the conclusion
>> that seabios simply forgets to align the base
>> addresses, and as the result, when the device
>> aligns the address down by clearing the "dont
>> care" bits, it can overlap the previous region.
>> I fixed the problem with the attached simple patch.
>> Still it is hard to believe such a bug can exist, so
>> I wonder if I am missing something. Any suggestions
>> to where should I dig to narrow the problem further?
>> Or can it be that seabios actually has the bug like
>> that and no one have noticed? :)
> The problem must be somewhere else.  seabios orders the pci bars by
> size, for best packing, and that should also get the alignment right.
> You shouldn't see unaligned bars at the place where you patch the code.
Thanks, I'll check that in a week.
What I know to the date, is that the large memory
region was overlapping with the small ROM region.
So they were of a different type, and maybe this is
why sorting didn't work.
I'll try to check.



More information about the SeaBIOS mailing list