Dear Sirs,
I am developing a bare metal PCIe Controller (RC) driver for LS1043A, using a LS1043ARDB board.
I successfully:
- setup all outbound ATUs programming (using LS1043A Linux device tree addresses for system and PCIe addresses and limits).
- discover PCIe bus endpoint and setup them (BARs, etc).
- setup GIC.
- test endpoint legacy interrupts.
Now, I am stuck on MSI interrupts. I am using LS1043A PCIe controller #3 (@ 0x3600000h), and an AX99100 serial/parallel device or an I350 ethernet endpoint, both supporting MSI.
I setup all MSI capability registers on endpoints, and attempted to deliver the MSI interrupt in two different ways:
A) without any inbound ATU, writing in the endpoint MSI address register the address of the SCFG_G2MSIIR register (0x1573000).
B) with an inbound ATU, writing in the endpoint MSI address register the PCIe bus address that the inbound ATU maps to 0x1573000 on the system bus.
In both cases, no interrupt is delivered to GIC. If I write by CPU to the SCFG_G2MSIIR (0x1573000) I see the proper interrupt (192,187,188,or 189) be
delivered depending on the data value I write (0, 1, 2 or 3); therefore, I assume my GIC is properly configured and SCFG is working.
What am I missing to have working MSI interrupts from endpoints?
Best regards
Eco
Dear Sirs,
I'm facing the same problem using the LS1043ARDB, and I believe I’m still missing something on the RC side.
I’m testing with PCIe controller #2 (same behavior observed on controller #3). For controller #2 I’m using SCFG_G2MSIIR = 0x1572000.
First of all, if I manually write from the CPU to 0x1572000, I correctly receive the MSI interrupt on the GIC, so the SCFG and GIC configuration look fine, as reported in eco56.
Also, I am enabling No‑Snoop = 1 and the coherency mapping, as described in the LS1043A documentation.
When I program the i350 endpoint to generate MSI:
This is the inbound iATU configuration:
With this configuration, I’m defining an inbound memory window that maps the PCIe address range 0x01570000 – 0x01573FFF into the same range on the system bus, so that inbound PCIe Memory Write transactions targeting 0x1572000 (SCFG_G2MSIIR for controller #2) should be translated and forwarded to the SCFG block.
With this inbound window enabled, I no longer see the PCIe error interrupt, which seems to confirm that the inbound MSI write is now accepted by the RC. However, I still do not see any MSI interrupt being delivered to the GIC when the endpoint generates MSI.
Could you please confirm if this setup is correct, or if there is any additional RC‑side configuration required to get MSI delivered to the GIC?
Riccardo