IMX8mq: core can't receive ipi interrupts.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8mq: core can't receive ipi interrupts.

1,512 Views
1541189572
Contributor III

Hi,

   I am working on hypervisor on imx8mq-evk platform. I send an ipi but core doesn't recevice it. Below is my code.

static void gicv3_send_sgi_list(uint32_t sgi, cpumask_t *mask)
{
        int cpu;
        uint64_t val;
        int list_cluster0 = 0;
        int list_cluster1 = 0;
        uint32_t val_32;

        for_each_cpu (cpu, mask) {
                if (cpu >= CONFIG_NR_CPUS_CLUSTER0)
                        list_cluster1 |= 1 << (cpu - CONFIG_NR_CPUS_CLUSTER0);
                else
                        list_cluster0 |= (1 << cpu);
        }

        /*
         * TBD: now only support two cluster
         */
        if (list_cluster0) {
                val = list_cluster0 | (0ul << 16) | (0ul << 32) | (0ul << 48) |
                 (sgi << 24);
                write_sysreg64(val, ICC_SGI1R_EL1);
        }

        if (list_cluster1) {
                val = list_cluster1 | (1ul << 16) | (0ul << 32) | (0ul << 48) |
                 (sgi << 24);
                write_sysreg64(val, ICC_SGI1R_EL1);
        }

        if (iomuxc_gpr_base) {
                /* pending the IRQ32 to wakeup the core */
                val_32 = readl_relaxed(iomuxc_gpr_base + 0x4);
                val_32 |= (1 << 12);
                writel_relaxed(val_32, iomuxc_gpr_base + 0x4);
                /* delay for a while to make sure cores wakeup done */
                udelay(50);
                val_32 &= ~(1 << 12);
                writel_relaxed(val_32, iomuxc_gpr_base + 0x4);
        }
        isb();
}

References: 

1. https://www.nxp.com/docs/en/errata/IMX8MDQLQ_0N14W.pdf 

2. irq-gic-v3.c\irqchip\drivers - linux-imx - i.MX Linux kernel 

Thanks for any advice!

Tags (1)
0 Kudos
3 Replies

1,208 Views
igorpadykov
NXP Employee
NXP Employee

Hi 书意 程 

for ipi usage one can look at arm community:

Intercore interrupts on a53 between EL1 and EL3 - Cortex-A / A-Profile forum - Processors - Arm Comm... 
interrupt distribution on A53 processor - Cortex-A / A-Profile forum - Processors - Arm Community 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,208 Views
1541189572
Contributor III

Thanks for your reply. But i run the code successfully on fvp with gicv3, so i think the code is correct but not work on imx8mq-evk platform. 

0 Kudos

1,208 Views
josemartins90
Contributor II

Hello, have you solved this problem?

0 Kudos