Part Number: AM6442
Hi All,
We are currently verifying the PCIe Root Complex functionality on a custom board equipped with AM64x, using Linux built based on Processor SDK Linux v9.2.
An FPGA is connected as the endpoint device.
On Linux, the FPGA is correctly recognized as a PCIe endpoint device, and we are able to access its PCIe configuration space and BARs.
Next, we are attempting to verify whether legacy interrupts from the FPGA can be detected.
To verify legacy interrupt detection, we used the following approach:
We assigned a legacy interrupt vector to the FPGA using the pci_alloc_irq_vectors() function,
retrieved the corresponding Linux IRQ number using pci_irq_vector(),
and registered a handler function with request_irq() to be called when the IRQ occurs.
When we triggered a legacy interrupt once from the FPGA, we confirmed that the registered handler function was successfully called.
However, when we repeatedly triggered legacy interrupts from the FPGA at approximately one-second intervals,
the handler function was called for a certain number of times,
but after that, it stopped being called.
This “certain number” is not consistent and varies with each repetition.
Upon checking the Linux source code, we found that when a legacy interrupt occurs,
the j721e_pcie_legacy_irq_handler() function in pci-j721e-host.c is called,
and within that function, the IRQ corresponding to the interrupt vector assigned to the FPGA is triggered.
Reference:
https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/pci/controller/cadence/pci-j721e-host.c?h=ti-rt-linux-6.1.y
We added log output to the j721e_pcie_legacy_irq_handler() function,
and observed that while the legacy interrupts from the FPGA were being triggered repeatedly,
log output appeared up to the point where the handler function stopped being called.
After that point, no further log output was observed.
Therefore, we believe the reason the registered handler function stopped being called
is that the j721e_pcie_legacy_irq_handler() function itself was no longer being invoked.
We would like to ask the following two questions:
[Question 1]
When a legacy interrupt is triggered by a PCIe endpoint device,
is it correct to expect that the j721e_pcie_legacy_irq_handler() function in pci-j721e-host.c will be called
in Linux built based on PSDK Linux v9.2?
[Question 2]
When legacy interrupts are repeatedly triggered from the endpoint device,
the j721e_pcie_legacy_irq_handler() function eventually stops being called.
What could be the possible causes of this phenomenon?
Best Regards,
Ito