[SeaBIOS] [PATCH] provide correct pci routing information in mptable

Kevin O'Connor kevin at koconnor.net
Wed Dec 23 20:48:24 CET 2009

On Wed, Dec 23, 2009 at 08:45:07PM +0200, Gleb Natapov wrote:
> On Wed, Dec 23, 2009 at 01:11:43PM -0500, Kevin O'Connor wrote:
> > Why only increase the allocated storage for intsrc by 16?  The loop
> > above seems like it could add a large number of entries.
> > 
> Unfortunately we have to allocate all memory in advance. The table can
> have max 4 entries per device (one entry for each pin), so 16 is enough
> for 4 devices.

Yeah - I suppose the table could be built in temp space and then
copied into the f-segment when the actual size is known.

> > Also, the foreachpci() macro will iterate over every PCI function -
> > there could be 8 functions to a pci device which could lead to
> > duplicates in the table (two pci functions on the same device could
> > use the same irq pin).
> > 
> Yes, correct. Need to rework this loop.

Sounds like it should find every function 0 pci entry and then loop
over the four possible pins?


More information about the SeaBIOS mailing list