> I don't need any DEC 21150 specific code anywhere? 

You shouldn't, PCI bridges are very standardized, so unless something is pretty broken, if the code understands bridges at all, everything should just work.

A simplified explanation of setting up the busses:
The basic procedure is to start at bus 0, device 0, function 0 looking for devices.  When a device is found, you read the configuration registers to see what type of device it is.
If the device is an endpoint device, you look to see how many base address registers it has, how much memory space it requests, etc.  Typically you keep a sorted list so that you can put the devices which request the most memory first, so you won't end up with gaps in the address map because of alignment constraints.
When a device is discovered, you need to check the other function numbers for the same bus/device.
If the device is a bridge, you write the configuration register to set the bus number ojf the secondary bus to the next higher bus number.
The register layout for bridge devices is standardized, so you should not need to know any specifics about the bridge device found to set up the secondary bus properly.

Once all the devices have been discovered on bus 0, if any of the devices found were bridges, you increment the bus number and do the same thing again for each bus.

I know I've left a lot of details out, you have to go through the PCI spec if you really want to understand it all.  The Mindshare PCI architecture book is good, much easier to read then going through the spec itself.
http://www.pcisig.com/specifications/conventional/
You can get the Mindshare book at Amazon, presumably other retailers as well.
ISBN 0201309742

-- Chris Caudle


