仅对英特尔可见 — GUID: gvf1621361183856
Ixiasoft
10.5.1. ebfm_barwr规程
10.5.2. ebfm_barwr_imm处理过程
10.5.3. ebfm_barrd_wait处理过程
10.5.4. ebfm_barrd_nowt处理过程
10.5.5. ebfm_cfgwr_imm_wait处理过程
10.5.6. ebfm_cfgwr_imm_nowt处理过程
10.5.7. ebfm_cfgrd_wait处理过程
10.5.8. ebfm_cfgrd_nowt处理过程
10.5.9. BFM配置处理过程
10.5.10. BFM共享存储器访问处理过程
10.5.11. BFM日志和消息处理过程
10.5.12. Verilog HDL格式化函数
仅对英特尔可见 — GUID: gvf1621361183856
Ixiasoft
B. 根端口枚举
本章节通过流程图来解释枚举过程。
枚举的目的是找到系统中所有连接的器件,并为每个连接的器件设置必要的寄存器并进行地址范围分配。
在枚举过程结束时,Root Port (RP)必须设置以下寄存器:
- Primary Bus, Secondary Bus and Subordinate Bus numbers
- Memory Base and Limit
- IO Base and IO Limit
- Max Payload Size
- Memory Space Enable bit
Endpoint (EP)还必须具有由RP设置的以下寄存器:
- Master Enable bit
- BAR Address
- Max Payload Size
- Memory Space Enable bit
- Severity bit
下图显示了连接器件的树形示例图,也是后面流程图的参考基础。
图 83. 实例系统中已连接器件的树形图
图 84. 根端口枚举流程图
图 85. 根端口枚举流程图(续)
图 86. 根端口枚举流程图(续)
注释:
- 对于Header Type 0和Header Type 1,Vendor ID和Device ID位于偏移0x00h。
- 对于PCIe Gen4,Header Type位于偏移0x0Eh(第二个DW)。如果位0设置为1,则表示该器件是一个Bridge(桥接);否则,它是一个EP。如果位7设置为0,表示是一个单一功能器件;否则,它是一个多功能器件。
- RP和non-RP器件的capability寄存器清单:
- 0x34h – Capabilities Pointers。使用该寄存器指向一个由Function实现的capabilities的链接列表:
- RP的Capabilities Pointer
- Address 40 -标识Power Management Capability ID
- Address 50 -标识MSI Capability ID
- Address 70 -标识PCI Express Capability结构
- non-RP的Capabilities Pointer
- Address 40 -标识Power Management Capability ID
- Address 48 -标识PCI Express Capability结构
- RP的Capabilities Pointer
- 0x34h – Capabilities Pointers。使用该寄存器指向一个由Function实现的capabilities的链接列表:
- EP没有与Primary, Secondary and Subordinate Bus编号相关的寄存器。
- Bridge/Switch IO Base and Limit寄存器偏移0x1Ch。这些寄存器是根据PCIe 4.0 Base Specification而设置。请参阅Base Specification(基本规范)的第7.5.1.3.6章节了解更准确的信息和流程。
- 对于EP Type 0头,BAR地址位于以下偏移:
- 0x10h – Base Address 0
- 0x14h – Base Address 1
- 0x18h – Base Address 2
- 0x1ch – Base Address 3
- 0x20h – Base Address 4
- 0x24h – Base Address 5
- 对于Bridge/Switch Type 1头,BAR地址位于以下偏移:
- 0x10h – Base Address 0
- 0x14h – Base Address 1
- 对于Bridge/Switch Type 1头,IO Base and IO限制寄存器都位于偏移0x1Ch。
- 对于Bridge/Switch Type 1头,Non-Prefetchable Memory Base and Limit寄存器都位于偏移0x20h。
- 对于Bridge/Switch Type 1头,Prefetchable Memory Base and Limit寄存器都位于偏移0x24h。
- 对于Bridge/Switch/EP Type 0 & 1头,Bus Master Enable位位于偏移0x04h (Command Register)位2。
- 对于Bridge/Switch/EP Type 0 & 1头,
- IO Space Enable位在偏移0x04h (Command Register) 位0。
- Memory Space Enable位在偏移0x04h (Command Register)位1。
- Bus Master Enable位在偏移0x04h (Command Register)位2。
- Parity Error Response位在偏移0x04h (Command Register)位6。
- SERR# Enable位在偏移0x04h (Command Register)位8。
- Interrupt Disable位在偏移0x04h (Command Register)位10。