转自:https://blog.csdn.net/hulidong971/article/details/41412199

1  PCIE基本概念

1.1   PCIE拓扑架构图

 

图解PCIE原理(从软件角度)

 

1.2 PCIE Switch内部结构图

 

图解PCIE原理(从软件角度)

 

1.3  PCIE协议结构图

图解PCIE原理(从软件角度)

 

2 PCIE枚举原理

2.1 Type0&Type1配置头空间

图解PCIE原理(从软件角度)

2.2 拓扑示例

连接Device0的端口设为Port0,连接Device1的端口设为Port1 (Port可以看作PCI Bridge)

图解PCIE原理(从软件角度)

2.3 枚举过程

Port0、Port1的相关Bus Register变化过程如下图

图解PCIE原理(从软件角度)

2.4 资源分配

2.4.1 非桥设备资源分配

以Device0的资源分配为例:需要64KB IO Memory  以及 256 Byte IOPort

(IOPort Base = 0x10000000,  IOMem Base = 0x20000000)

图解PCIE原理(从软件角度)

2.4.2 桥设备资源分配

Port0为支持Devic0  IO & Memory Routing相关的Register设定

图解PCIE原理(从软件角度)

3  PCIE事务交互

3.1 配置空间读写

Read Conf Space:  Device0 offset 4

图解PCIE原理(从软件角度)

3.2 内存空间读写

MMIO Read:  addr = 0x20000004

图解PCIE原理(从软件角度)

3.3 中断发起、取消

 

图解PCIE原理(从软件角度)

 

 

相关文章:

  • 2021-11-30
  • 2021-10-02
  • 2021-07-28
  • 2021-12-26
  • 2022-01-17
  • 2021-12-18
  • 2022-12-23
  • 2022-01-20
猜你喜欢
  • 2021-06-06
  • 2022-12-23
  • 2021-05-16
  • 2021-08-12
  • 2022-12-23
  • 2021-11-13
相关资源
相似解决方案