This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

dm816x pcie in-out bound



在sprugx8_dm816x关于PCIE这一章的举例:

For a given OCP/Internal Address of 9D3A_1234h,assume a 2MB region partition,64 bit addressing is to be used and for region 9,

OBOFFSET9_HI = 3344 5566h

OB_OFFSET9 = 56Ex xxxxh。

根据9D3A 1234h可以确定region为9,Offset 为001A 1234h。

PCIe Base address = 3344 5566 56E0 0000h

PCIE addrress = 3344 5566 56E0 0000h + 001A 1234h = 3344 5566 56FA 1234h

这里的offset和PCIe Base address分别代表什么,是不是经过映射后,我们往9D3A_1234h这个地址写数据,会被PCIE控制器发送给PCIE地址的 3344 5566 56FA 1234h? OB_OFFSET9的值要如何选择,在手册上说OB_OFFSET_INDEXn:Application software initializes this register with the 32-bit PCIe address

我在内核代码中看到的对于outbound的配置OB_OFFSET_INDEXn都是被设置为使用pci_resource_start获得的值。outbound映射和PCIE data space 0x20000000 ~ 0x2fffffff有什么关系。

inbound映射的例子:

PCIe Address :1234 5678 ABC5 0000h

IB_BAR1 = 2. 
• IB_START1_HI = 1234 5678h
• IB_START1_LO = ABC0 0000h
• IB_OFFSET1 = 3340 0000h

PCIe Address of 1234 5678 ABC5 0000h is translated or mapped to OCP/Internal
address, 3345 0000h.

是不是pcie从设备发往地址1234 5678 ABC5 0000h的数据会被PCIE 控制器发送到 3345 0000h这个内存地址。

这里的 

IB_START1_HI = 1234 5678h
• IB_START1_LO = ABC0 0000h
• IB_OFFSET1 = 3340 0000h

三个寄存器的值该如何选择。

在使用PCIE启动的时候,这个表里的base address表示什么。