This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6678 Generate MSI Interrupt as PCIe EP

Hello,

I've configured a C6678-EVM with a AMC-To-PCIe-Adaptor-Card and want to trigger the linux system (host configured as RC) with an MSI interrupt. With the PCIe-Documentation (chapter 2.13.2.2) I have to do the following:

-the MSI generally has to be enabled in the MSI_CAP-registers; is it necessary to do this in the IBL or can it be configured in the application startup?
-Host enables MSI-Interrupts (and disable all Legacy interrupts) in the application registers

Now I'm not sure how to trigger a MSI-Interrupt to the host. Some threads mentioned it is enough to write to the RAW_Status_Registers and then the MSI-Interrupt is generated. This is not conform to the PCIe-Specification, but it works.

On the other side (like in the documentation):
-the host / system has to configure the MSI_LOW32 and MSI_DATA register
-the DSP gets the address and data, then writes the data to the address with the correct outbound translation

Maybe there exists now an example? It's very similar to the PCIe-Interrupt-Boot example, but instead of Legacy IRQs with MSI.

Thanks for clarifying this issue.
Regards,
Bernd


  • Hello,

    testing to send a MSI-Interrupt to the Linux host system, I'm just not able to trigger it. For example, the host give the DSP the MSI_Address 0xFEE0F00C and the MSI_Data 0x4191. So I configure the outbound translation in the way below.

    Checking the address pPCIEData I see that there's no value after the memcpy. Maybe this is due to the outbound translation? I'm able to set the memory with CCS before setting the Outbound translation. After this, I'm not able to change the memory with CCS.

    Can somebody tell if the outbound translation is wrong?

    Regards,
    Bernd

    uint32_t uiMSIAddress = DEVICE_REG32_R(MSI_LOW32) | 0x1;    // Enable Outbound region
    uint32_t uiMSIData = DEVICE_REG32_R(MSI_DATA);
    uint32_t uiCMDStatus = DEVICE_REG32_R(CMD_STATUS);
    uint32_t* pPCIEData = (uint32_t*) (0x60000000 + (DEVICE_REG32_R(MSI_LOW32) & 0x000FFFFF));
    uiCMDStatus |= 0x2;

    DEVICE_REG32_W(OB_SIZE, 0x0);   // OB_Region is 1 MB
    DEVICE_REG32_W(OB_OFFSET_INDEX0, uiMSIAddress);
    DEVICE_REG32_W(OB_OFFSET0_HI, 0x0);
    DEVICE_REG32_W(CMD_STATUS, uiCMDStatus);

    memcpy(pPCIEData, &uiMSIData, sizeof(uint32_t));

  • As addition, we're unfortunately not able to debug this at the moment. Using PCIe-Analyzer (regardless Gen1 or Gen2) we're not able to get a stable connection to the EVM with the Adaptor-Card (maybe signal is too low with the EVM, the Adaptor-Card and another Adapter-Card for the Analyzer).

    So it would be very helpful if somebody has an idea how I can go on with this issue.

    Regards,
    Bernd

  • Are you running Linux-c6x 2.0 on C6678? It does not support PCIe in 2.0 release.

  • Hello,

    no, the linux system is a standard Ubuntu system and on the C6678 runs the standard PCIe-Boot Application or a Sys/Bios-Application.

    Regards,
    Bernd

  • Having debugged a little bit deeper, it can be seen that the interrupt arrives at the OS; only our own driver has to be adapted to acknowledge the IRQ.

    Regards,
    Bernd