[coreboot] Max pci bus number?

Stefan Reinauer stepan at coresystems.de
Sun Nov 9 12:03:38 CET 2008

On 09.11.2008, at 03:52, Kevin O'Connor <kevin at koconnor.net> wrote:

> How can I find the maximum PCI bus number of the system?
> The PCI bios calls need to be able to return this information.  It
> also helps when scanning for pci devices, because then we don't have
> to check for all 256 possible buses.
> Right now, SeaBIOS has a compile time definition for the max, but that
> is awkward and it can lead to hard to debug failures.
> Ideas?

Yes, look at coreinfo. The idea is to start at bus 0 and whenever you  
see a bridge, iterate over it's secondary bus. This way you get all  
devices but never scan a single bus too much.

> -Kevin
> --
> coreboot mailing list: coreboot at coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot

More information about the coreboot mailing list