PCIe基础概念

本文介绍了PCI_Express体系结构的关键术语,如RCB、MPS、MRRS、地址对齐、配置空间的使用、MSI中断机制以及inbound/outbound交易处理。通过阅读《WDCdatabook》,作者详细解读了PCIe设备的内存管理和中断控制,包括bar地址管理、信用机制以及lspci命令在设备拓扑查看中的应用。
摘要由CSDN通过智能技术生成

《PCI_Exepress体系结构导读》《WDC databook》读书笔记

RCB  read completion boundary

MPS max payload size

MRRS max read request size

4K对齐 

Specifies the address page boundary size supported by the AXI bridge. No packet can
have an address that crosses the specified address boundary.

DW对齐 double word对齐,4字节对齐

配置空间 

tag 读请求与读完成报文中,多个报文并行发出

capacity 配置空间读写header中包含capacity链表指针,msi就是其中一个capacity,还有常见的电源管理aer错误报告机制。在 PCIe 设备中, 每 一个 Capability 结构都有唯一的 ID

bar base address register,存在于配置空间中,ep设置申请的bar空间大小,在枚举阶段rc根据每个ep的申请size分配地址给ep,一般这段地址对应ep的寄存器地址,这个机制需要rc驱动再mmap一次让rc端可以直接操作ep的寄存器

credit机制

msi intx是电平触发,msi是边缘触发,msi的实质是mem write报文,MSI 中断机制使用存储器写 TLP 实现这个存储器写 TLP 的目的地址为 MSI Capability 结构中的 Message Address 字段而数据为 Message Data 寄存器中的值

inbound/outbound pcie 总线地址与ddr地址之间转换
outbound Transactions that enter the controller from your application side of the controller. These
transactions are passed to the native controller, where they are sent out onto the PCIe wire.
inbound PCIe transactions that enter the controller from the wire side of the controller (PCIe wire). These transactions are delivered to your application side.
iATU  internal address translation unit
msi 申请中断(pci_irq_vector  request_irq)之前Enable- 申请成功后Enable+,count 代表最大支持多少msi irq
lspci -vt 可以看出拓扑
pcie设备号意义 bus:dev:func.
lspci
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

shenhuxi_yu

感谢投币,继续输出

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值