PCIe 协议培训
目录
一 、PCIe 体系结构
..........................................................................................................................
3
1.1 PCIe 系统功能介绍
........................................................................................................
3
1.2 PCIe 拓扑
........................................................................................................................
3
1.3 CPU PCIe 设备
...............................................................................................................
4
1.4 Switch PCIe 设备
............................................................................................................
5
1.5 端点设备
.........................................................................................................................
5
1.6 PCIe 的分层结构
............................................................................................................
6
二、PCIe 事务处理机制
....................................................................................................................
7
2.1 PCIe 事务及类型
..................................................................................................................
7
2.2 配置事务
..............................................................................................................................
8
2.3 memory 事务
.......................................................................................................................
9
2.4 IO 事务
...............................................................................................................................
10
三、枚举
...........................................................................................................................................
10
3.1 枚举概述
...........................................................................................................................
10
3.2 ECAM 空间划分
.................................................................................................................
11
3.3 设备发现枚举流程
...........................................................................................................
11
3.4 Memory 资源分配
.............................................................................................................
18
四、路由机制
...................................................................................................................................
19
4.1 地址路由
...........................................................................................................................
19
4.2 地址路由实例
...................................................................................................................
20
4.3 基于 ID 的路由
..................................................................................................................
22
4.4 ID 路由实例
........................................................................................................................
23
五、数据包传输过程与数据一致性
..............................................................................................
24
5.1 LCRC 机制
..........................................................................................................................
24
5.2 ECRC 校验机制
..................................................................................................................
25
5.3 poison TLP
.........................................................................................................................
25
六、PCIe 错误检测和上报机制
......................................................................................................
27
6.1 PCIe 错误分类
....................................................................................................................
27
6.2 PCIe 错误上报机制概述
..................................................................................................
28
6.3 AER 错误上报相关寄存器
................................................................................................
28
6.5 PCIe 错误上报实现
...........................................................................................................
32
6.6 error message 控制
...........................................................................................................
35
6.6.1 endpoint 上报 error message
...............................................................................
35
6.6.2 bridge 上报 error message
..................................................................................
36
七、MSI 与 MSI-X
...........................................................................................................................
37
7.1 MSI 能力结构
.....................................................................................................................
37
7.1.1 MSI 能力结构头(offset:00h)
............................................................................
39
7.1.2 MSI 控制寄存器(offset:02h)
............................................................................
39
7.1.3 MSI Message Address 寄存器(offset:04h)
..........................................................
41
7.1.4 MSI 高地址寄存器(offset:08h)
.............................................................................
41