pci_scan_get_dev() in pci_scan_bus()

Eric W. Biederman ebiederman at lnxi.com
Tue Mar 2 18:09:00 CET 2004


Li-Ta Lo <ollie at lanl.gov> writes:

> Eric,
> 
> I am reading the device tree/resource allocation code 
> and trying to add more doxygen stuff. One thing I am not
> queit sure is the pci_scan_get_dev() in pci_scan_bus().
> 
> 	for (devfn = min_devfn; devfn <= max_devfn; devfn++) {
> 		uint32_t id, class;
> 		uint8_t hdr_type;
> 
> 		/* First thing setup the device structure */
> 		dev = pci_scan_get_dev(&old_devices, devfn);
> 
> My understanding is some pci devices are static devices too
> and are already "enumerated" befor the pci_scan_bus() (actually,
> the dev_enumerate()) is called and they are on the device
> tree (or list) by the time pci_scan_bus() is called. The
> pci_scan_get_dev() try to find the device under enumeration
> on that list. Am I correct ?

Yes.  

Eric



More information about the coreboot mailing list