PCI Host Bridges and the PCI Config Space
Posted: Thu Jan 08, 2015 10:41 pm
Hello All,
I have a few questions regarding PCI Host Bridges and the PCI Config Space and I was hoping someone here would be able to offer some help.
Firstly looking at these images from an Intel Xeon CPU datasheet (http://www.intel.co.uk/content/dam/www/ ... -vol-2.pdf)-
It shows CPUBUSNO 0 and CPUBUSNO 1. CPUBUSNO 0 is always PCI bus 0 in the PCI Config Space, whereas CPUBUSNO 1 can change, but on the example I was looking at it was PCI bus 255.
When I look at the ACPI DSDT for the system it shows 2 PCI Host bridges, one that accepts buses 0 - 254 and the other that accepts bus 255, which makes sense.
First question, would I be right in assuming that it looks like the 2 Host bridges have not been mapped into the PCI config space? Device 0 on bus 0 is mapped to the DMI2 host bridge and there is nothing on Bus 255.
Second question, taken from the OSDev page regarding PCI enumeration -
"The final step is to handle systems with multiple PCI host controllers correctly. Start by checking if the device at bus 0, device 0 is a multi-function device. If it's not a multi-function device, then there is only one PCI host controller and bus 0, device 0, function 0 will be the PCI host controller responsible for bus 0. If it is a multifunction device, then bus 0, device 0, function 0 will be the PCI host controller responsible for bus 0; bus 0, device 0, function 1 will be the PCI host controller responsible for bus 1, etc (up to the number of functions supported)."
Can you always be sure that B0:D0:F0 is going to be the PCI Host Bridge? Using the above example it isn't, could it not be mapped to any device on bus 0?
Third question, if you have a multi PCI Host Bridge system, like the Xeon example, even if both the bridges are mapped into the config space, would the second host bridge (that produces bus 255) be located at B0:D0? would it not be at B255:D0 if anything. The OSDev page says that a second PCI host bridge would be at bus 0, device 0, function 1 and be responsible for bus 1? What if bus 1 was connected to bus 0, that doesn't seem to make much sense, and you'd be limited to 8 PCI buses.
If anyone can help clear things up for me it would be greatly appreciated.
Kind Regards,
Hallam
I have a few questions regarding PCI Host Bridges and the PCI Config Space and I was hoping someone here would be able to offer some help.
Firstly looking at these images from an Intel Xeon CPU datasheet (http://www.intel.co.uk/content/dam/www/ ... -vol-2.pdf)-
It shows CPUBUSNO 0 and CPUBUSNO 1. CPUBUSNO 0 is always PCI bus 0 in the PCI Config Space, whereas CPUBUSNO 1 can change, but on the example I was looking at it was PCI bus 255.
When I look at the ACPI DSDT for the system it shows 2 PCI Host bridges, one that accepts buses 0 - 254 and the other that accepts bus 255, which makes sense.
First question, would I be right in assuming that it looks like the 2 Host bridges have not been mapped into the PCI config space? Device 0 on bus 0 is mapped to the DMI2 host bridge and there is nothing on Bus 255.
Second question, taken from the OSDev page regarding PCI enumeration -
"The final step is to handle systems with multiple PCI host controllers correctly. Start by checking if the device at bus 0, device 0 is a multi-function device. If it's not a multi-function device, then there is only one PCI host controller and bus 0, device 0, function 0 will be the PCI host controller responsible for bus 0. If it is a multifunction device, then bus 0, device 0, function 0 will be the PCI host controller responsible for bus 0; bus 0, device 0, function 1 will be the PCI host controller responsible for bus 1, etc (up to the number of functions supported)."
Can you always be sure that B0:D0:F0 is going to be the PCI Host Bridge? Using the above example it isn't, could it not be mapped to any device on bus 0?
Third question, if you have a multi PCI Host Bridge system, like the Xeon example, even if both the bridges are mapped into the config space, would the second host bridge (that produces bus 255) be located at B0:D0? would it not be at B255:D0 if anything. The OSDev page says that a second PCI host bridge would be at bus 0, device 0, function 1 and be responsible for bus 1? What if bus 1 was connected to bus 0, that doesn't seem to make much sense, and you'd be limited to 8 PCI buses.
If anyone can help clear things up for me it would be greatly appreciated.
Kind Regards,
Hallam