[SeaBIOS] [PATCH] Don't overallocate mptable
Gleb Natapov
gleb at redhat.com
Thu Dec 24 19:16:19 CET 2009
On Thu, Dec 24, 2009 at 12:22:12PM -0500, Kevin O'Connor wrote:
> On Thu, Dec 24, 2009 at 06:54:55PM +0200, Gleb Natapov wrote:
> > On Thu, Dec 24, 2009 at 11:38:45AM -0500, Kevin O'Connor wrote:
> > > foreachpci(bdf, max) {
> > > + if (pci_bdf_to_bus(bdf) > 0)
> > > + break;
> > mptable routing info should be created for each pci bus.
>
> My read of the spec is that independent PCI buses need to be added to
> the MPTable, but a bus created due to a PCI-to-PCI bridge (eg, on an
> add-on card) need not go into the table.
>
> > See example here:
Ah so pci_bdf_to_bus(bdf) > 0 for the bus behind PCI-to-PCI bridge?
I don't wee why you read spec this way. Can you point me to the part of
the spec that makes you think so?
> > http://people.freebsd.org/~fsmp/SMP/mptable/t30
>
> In that example, it looks like the machine has two independent buses -
> note how bus 1 has more than four irqs - so it can't be an add-on
> card.
Yes. In this example there are several PCI domains.
>
> > Hmm. It looks like we need to create io_bus entries dynamically
> > for each newly discovered PCI bus.
>
> Right now, the pciinit.c code handles neither PCI-to-PCI bridges nor
> independent PCI bridges. I think it would be useful to support
> bridges (for mapping in add-on cards that have them), but I don't know
> why an emulator would want to have independent buses. Note that it's
> difficult to detect an independent bus - some sideband mechanism is
> needed (eg, see CONFIG_PCI_ROOT1 in src/config.h).
>
--
Gleb.
More information about the SeaBIOS
mailing list