[SeaBIOS] PCI regions mapping problem

Gerd Hoffmann kraxel at redhat.com
Fri Apr 21 08:59:50 CEST 2017

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.

Any chance you've patched seabios to support your emulator?


More information about the SeaBIOS mailing list