一、PCIe地址空间操作
参考link
http://blog.chinaaet.com/justlxy/p/5100053318
注:PCIe Spec中明确指出,IO地址空间只是为了兼容早期的PCI设备(Legacy Device),在新设计中都应当使用MMIO,因为IO地址空间可能会被新版本的PCI Spec所抛弃
参考link
http://blog.chinaaet.com/justlxy/p/5100053319
作为RP,将被视作一个bridge,所以Configuration Space Header是type 1类型的,在DesignWare的 PCI Express RP controller Reference Manual中,其对应的寄存器描述为PF0_TYPE1_HDR。
作为EP,Configuration Space Header是type 0类型,DesignWare的 PCI Express EP controller Reference Manual中,其对应的寄存器描述为PF0_TYPE0_HDR。
DesignWare的 PCI Express RP/EP controller Reference Manual中的Register Descriptions就是PCIe的Configuration Space
参考link
http://blog.chinaaet.com/justlxy/p/5100058234
二、PCIe配置流程
ATU outbound就是发送地址进行的映射
ATU inbound就是接收地址进行的映射
参考link
https://blog.csdn.net/qq_39815222/article/details/121047739
DesignWare ATU配置流程
ATU_REGION_CTRL_1寄存器中bit[4:0] TYPE为TLP Header的TYPE域