Hello,
I am currently trying to get MSI working on a custom board based on the AM571x IDK.
The Root Complex is a QNX system.
The PCIe link comes up and dat transfers are working.
We are now trying to get the MSI interrupts working.
According to the TRM spruhz7j section 24.9.4.6.2.2.2 PCIe Controller MSI Transmission Methods (EP mode) there are two methods for MSI transmission.
We are using the HW method as that seem to be the one used in all the example code.
I understand that the MSI is an outbound memory write operation from the EP and requires an outbound address translation.
The example code for setting up the outbound translation for MSI is
/* Set up OB region for MSI generation on EP */
/* Configure OB region for MSI generation access space */
regionParams.regionDir = PCIE_ATU_REGION_DIR_OUTBOUND;
regionParams.tlpType = PCIE_TLP_TYPE_MEM;
regionParams.enableRegion = 1;
regionParams.lowerBaseAddr = PCIE_WINDOW_MSI_ADDR + resSize;
regionParams.upperBaseAddr = 0; /* only 32 bits needed given data area size */
regionParams.regionWindowSize = PCIE_WINDOW_MSI_MASK;
regionParams.lowerTargetAddr = PCIE_PCIE_MSI_BASE;
regionParams.upperTargetAddr = 0U;
retVal = Pcie_atuRegionConfig(handle, pcie_LOCATION_LOCAL, (uint32_t) 0U, ®ionParams);
I understand the lower and upper base address is the local memory region the MSI will be written to. The lower and upper target address should be in the PCIe RC memory space. All the example code appears to be written with the expectation that the RC will be another TI processor and has the target address hard coded.
Am I correct in that I should read the PCIECTRL_EP_DBICS_MSI_ADD_L32 and PCIECTRL_EP_DBICS_MSI_ADD_U32 registers and used these for the target address for MSI outbound translation?
Joe