"Richard Smith" smithbone@gmail.com writes:
On 4/24/06, Christian Sühs chris@suehsi.de wrote:
Here is the output with changed patch. vendor/device ID to cyberpro.
I think I am beginning to see what's happening here device 12.4 seems to have mutiple entries in the device tree.
I've not looked at the pci enum stuff so I don't quite understand what is going on but looking at the log I see.. (I've sniped it down a bit)
PCI_DOMAIN: 0000 enabled PCI_DOMAIN: 0000 scanning... PCI: pci_scan_bus for bus 0 PCI: 00:00.0 [1078/0001] ops PCI: 00:00.0 [1078/0001] enabled PCI: 00:09.0 [10ea/5000] ops PCI: 00:09.0 [10ea/5000] enabled PCI: 00:12.0 [1078/0100] bus ops
Notice that it detected the southbrige with 'bus' ops
southbridge_enable: dev is 00018900 PCI: 00:12.0 [1078/0100] enabled malloc Enter, size 668, free_mem_ptr 00022000 malloc 0x00022000 PCI: 00:12.1 [1078/0101] enabled malloc Enter, size 668, free_mem_ptr 0002229c malloc 0x0002229c PCI: 00:12.2 [1078/0102] ops cs5530_ide: ide_enable PCI: 00:12.2 [1078/0102] enabled malloc Enter, size 668, free_mem_ptr 00022538 malloc 0x00022538 PCI: 00:12.3 [1078/0103] enabled malloc Enter, size 668, free_mem_ptr 000227d4 malloc 0x000227d4 PCI: 00:12.4 [1078/0104] enabled
So here is entry #1 and it has the device enabled.
malloc Enter, size 668, free_mem_ptr 00022a70 malloc 0x00022a70 PCI: 00:13.0 [0e11/a0f8] enabled
Now we move into another scan of just the 12.x devices
scan_static_bus for PCI: 00:12.0 PNP: 002e.0 enabled PNP: 002e.1 enabled PNP: 002e.2 enabled PNP: 002e.3 disabled PNP: 002e.4 enabled PNP: 002e.5 enabled PNP: 002e.6 enabled PNP: 002e.7 enabled PNP: 002e.8 enabled PCI: 00:12.1 disabled PCI: 00:12.2 enabled PCI: 00:12.3 disabled PCI: 00:12.4 disabled scan_static_bus for PCI: 00:12.0 done PCI: pci_scan_bus returning with max=00 scan_static_bus for Root Device done
So according to all this 12.4 is in the tree twice once as enabled and once as disabled. Which is what we see later on when doing then VGA resource allocation.
I'm not quite certain that is right, although it may be. There is a part where we unify the static and the dynamic device tress.
It does not look correct for 12.1,12.2,12.3,12.4 to be static devices of device 12.0 though. I suspect there is an unnecessary level of nesting in Config.lb that is causing this.
Most of this code was doen by Eric B. I've added him to the To: list since I don't think he follows the LB list very closely anymore.
No but I am happy to help when I have a minute. Somedays I feel like I am wearing as many hats as the mad hatter in Alice in Wonderland....
Eric:
I know you are a busy man and coming in on this cold but perhaps you can shed some light on this? Chris is trying to set up another board based on the eaglelion/5bcm board but his board has an additional VGA device at 9.0 and he wants that device to show up as the primary device. We have 12.4 marked as "off" in the Options.lb but its still getting picked and assiged to the VGA resource.
So I would first check to see if the VGA adapter identification code checks the enable bit. It is quite possible that just because a device is disable that I we don't ignore it. Looking at an old version of the code, we do clearly do not check the enable bit, and just finds the first vga device on the list of all devices.
The gory details should be on the list under this thread.
I'm trying to answer without looking :)
Eric