Myles Watson wrote:
-----Original Message----- From: ron minnich [mailto:rminnich@gmail.com] Sent: Monday, October 27, 2008 8:57 AM To: Myles Watson Cc: Coreboot Subject: Re: [coreboot] v3 HT
On Mon, Oct 27, 2008 at 7:48 AM, Myles Watson mylesgw@gmail.com wrote:
I don't think we need to expand the dts to fix this, we just need to
make
the code match the structure.
Do you have a rough idea of how this would look in the code? This is a good catch.
Right now the code goes through the list of children and initializes them as bridges, without checking to see that they are. Then it enumerates them with the pci code.
I think we'd have to find the children that are bridges and then enumerate them with the list of children, so that we can pass parameters correctly. I don't think it would be too hard.
- Find bridges and set them to not decode
- Set first bridge to decode all device numbers (HT Unit IDs)
- Do PCI scan on bridge with remaining non-bridge children
- Find next bridge
- Set to decode next device numbers
- Goto 3
I think that the dts is can/should to handle arbitrary bus numbering (since a bridge can be plugged into any slot making everything change). The numbers are not so important if as long as the tree has the same connections (bridgeA has device 1, 2, 3 and bridgeB has x, y, z).
I don't think that you need a bridge scan before the device scan. It can be done as one. The device tree just needs to note the appropriate decode (bus number) for the bridge and the devices under it. Also, If the bus is already numbered we we shouldn't change it. Just use what is set.
Marc