[Haifux] PCIe: What does the geographical address tells us?
Eli Billauer
eli at billauer.co.il
Thu Jun 9 19:02:09 MSD 2011
Hi,
During my PCIe lecture (there's another one on Monday, right?) I was
asked if the geographical address (Bus /Device / Function) implies a
physical position on the board. In other words, if one can recognize
which card is which by virtue its assigned bus ID, as given by BIOS
during boot.
My original answer was that I don't know about anything assuring that. A
small experiment I made today yielded a decisive answer.
Namely, I moved a PCIe card from slot to slot on the motherboard, and
found out that it got the same bus ID in both cases: Bus address 1,
Device 0 and Function 0.
As it turned out, these two slots are connected to two different
switches on the board (maybe because one is 1x and the second 16x). What
apparently happened, was that the BIOS didn't bother to assign a bus
number to a switch which didn't have any device connected to it, so bus
number one went to the first switch which had something to show for. As
a result, bus number one followed the PCIe card.
Even though I don't have a second card to test this with, it's only
logic to assume that a PCIe card's bus number can change without moving
it, by plugging in another card, which is connected to a switch the BIOS
scans first. The new card will then "steal" bus number 1, and our card
will "move" to bus number 2 all of the sudden.
Answer to question in title: Pretty much nothing.
Conclusion: If you really care about identifying your hardware, use what
udev has to offer.
See you Monday,
Eli
--
Web: http://www.billauer.co.il
More information about the Haifux
mailing list