PCI-X 和PCIe 總線規範要求其設備必須支持Capabilities 結構。在PCI 總線的基本配置空間中,包含一個Capabilities Pointer 寄存器,該寄存器存放Capabilities 結構鏈表的頭指針。在一個PCIe 設備中,可能含有多個Capability 結構,這些寄存器組成一個鏈表,以下圖所示。指針
其中每個Capability 結構都有惟一的ID 號,每個Capability 寄存器都有一個指針,這個指針指向下一個Capability 結構,從而組成一個單向鏈表結構,這個鏈表的最後一個Capability 結構的指針爲0。鏈表開始的指針地址爲0x34處的1byte數值,尋址過程以下。blog
1. We look at address 34h and see the address of the next capability register set (50h).ci
2. We jump to 50h and see a capability ID of 05h (MSI Capability Structure). We look at the next capability pointer in 51h to find which address to jump to next (78h).get
3. We jump to 78h and see a capability ID of 01h (Power Management Capability Structure). We look at the next capability pointer in 79h to find which address to jump to the next (80h).it
4. We jump to 80h and see a capability ID of 10h (PCI Express Capability Structure). We see 00h as the next capability pointer in 81h signifying the end of the linked list.io
參考:http://www.alterawiki.com/wiki/PCI_Configuration_Spaceclass