by support »
Hello,
You seem to be trying peer-to-peer DMA, which is well within PCIe's specification. So at least in theory, this should work: The root port (probably hosted by the CPU chip or its memory controller) should route any packet that is mapped to a BAR range to the BAR's owner, regardless of its origin: The CPU or any device on the bus. Same goes for any PCIe switch on the way (if there is any).
I have no personal experience with this as of yet, but it's a rather common practice. Why it failed in your case -- it's not clear. Maybe the packets are malformed to begin with, and the root port was forgiving enough when they were destined to the CPU's memory. And maybe your host doesn't support peer-to-peer. Sometimes CPUs don't really support the full PCIe spec (or have bugs regarding less used features), in particular old (like three years) x86 and certain embedded devices.
if you don't have the freedom to choose a suitable root port, you may want to consider adding your own switch. For example, an evaluation board from Avago (formerly PLX) could be helpful.
Regards,
Eli
Hello,
You seem to be trying peer-to-peer DMA, which is well within PCIe's specification. So at least in theory, this should work: The root port (probably hosted by the CPU chip or its memory controller) should route any packet that is mapped to a BAR range to the BAR's owner, regardless of its origin: The CPU or any device on the bus. Same goes for any PCIe switch on the way (if there is any).
I have no personal experience with this as of yet, but it's a rather common practice. Why it failed in your case -- it's not clear. Maybe the packets are malformed to begin with, and the root port was forgiving enough when they were destined to the CPU's memory. And maybe your host doesn't support peer-to-peer. Sometimes CPUs don't really support the full PCIe spec (or have bugs regarding less used features), in particular old (like three years) x86 and certain embedded devices.
if you don't have the freedom to choose a suitable root port, you may want to consider adding your own switch. For example, an evaluation board from Avago (formerly PLX) could be helpful.
Regards,
Eli