PCIe 中的Capability 结构的寻址

PCI-X 和PCIe 总线规范要求其设备必须支持Capabilities 结构。在PCI 总线的基本配置空间中,包含一个Capabilities Pointer 寄存器,该寄存器存放Capabilities 结构链表的头指针。在一个PCIe 设备中,可能含有多个Capability 结构,这些寄存器组成一个链表,如下图所示。

 其中每一个Capability 结构都有唯一的ID 号,每一个Capability 寄存器都有一个指针,这个指针指向下一个Capability 结构,从而组成一个单向链表结构,这个链表的最后一个Capability 结构的指针为0。链表开始的指针地址为0x34处的1byte数值,寻址过程如下。

 

 

1. We look at address 34h and see the address of the next capability register set (50h).

Start.jpg

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).

Msi.jpg

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).

Pm.jpg

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.

Pcie.jpg

 

 

参考:http://www.alterawiki.com/wiki/PCI_Configuration_Space

转载于:https://www.cnblogs.com/zhongzhe/p/3900111.html

  • 1
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值