aHi,
I have a question about the address translation of the following request:
Transmitting an 8MB buffer located at 0x80000000-0x80800000 to to a PC with PCIe address = 0x8CB22000.
As I understand from the example PCIe Outbound Address Translation in PCIe UseCases for Keystone Devices:
CMD_STATUS[OB_XLT_EN] = 1
OB_SIZE = 8MB
Transfer to PCI_Data: dataSize = 8MB, srcAddr = 0x80000000, dstAddr = 0x60000000
OB_OFFSET_INDEX0 = 0x8CB22001 ( PCIe address with enabling the region)
OB_OFFSET0_Hi = 0x0
According to the example the translated address will be:
bits[31:23] of 0x8CB22000 + bits[22:0] of 0x60000000 = 0x8C800000 (bits 22:0 are zeroed)
To get the correct PCIe address I need to split the PCI address between the 2 elements as follows:
Transfer to PCI_Data: dataSize = 8MB, srcAddr = 0x80000000, dstAddr = 0x60522000
OB_OFFSET_INDEX0 = 0x8CB22001 (Outbound PCIe address with enabling region 0)
OB_OFFSET0_Hi = 0x0
OB_OFFSET_INDEX1 = 0x8CE00001 (Remaining of buffer and enabling region 1)
OB_OFFSET1_Hi = 0x0
bits[31:23] of 0x8CB22000 + bits[22:0] of 0x60522000 = 0x8CB22000
This will cause the 8MB buffer to be transfered via 2 regions; region0 and region1.
It seems wrong to me.
What is the right way to do it?
Thanks,
Alan.