Cortex-R52 GICv3 Interrupt1023

Hello

I met an issue of FIQ interrupt1023 occurred when two periodic interrupts existed: vector270: priority: 12, group1 (IRQ) and vector27: priority 16, group0 (FIQ).

When the fiq_exception got the INTID1023, I saw that ICC_HPPIR0: 0x1B (27), ICC_AP1R0: 0x1000 (active priority: 12). As the irq_exception will not mask FIQ, I suppose that when the CPU is handling vector270 (IRQ), vector27 (FIQ) comes and interrupts it. But as the priority of vector27 is lower than vector270, interrupt1023 is reported due to no sufficient priority. Is my understanding right ?

If so, what are the recommendations for irq and fiq handling when the system have both IRQ and FIQ interrupts enabled ?

BR, Grace

Parents
  • A read of ICC_IARn returns 1023 either when there is no HPPI or the HPPI is one that you can't ack via that register at this time.

    As ICC_HPPIR0 reports 0x1B (27) you know there is a HPPI.  Now, just because there is a HPPI doesn't mean the GIC will signal an IRQ or FIQ to the core.  The HPPI might be masked either by ICC_PMR (priority mask) or ICC_RPR (running priority).  Running priority is derived from the ICC_APxR0_EL1 registers.

    As the irq_exception will not mask FIQ, I suppose that when the CPU is handling vector270 (IRQ), vector27 (FIQ) comes and interrupts it. But as the priority of vector27 is lower than vector270, interrupt1023 is reported due to no sufficient priority. Is my understanding right ?

    Each INTID has a configurable priority, meaning you can't (architecturally) infer the relative of priorities of two interrupts based on their INITDs.  I know on some interrupt controllers INTID and priority are connected, but it is not true for GICs.  If you're see the FIQ exception then that implies the HPPI beat both the PMR and RPR, that means it's higher priority than the already active priority.

    A couple of questions:

    • Are you seeing the FIQ exception be taken?  (I've guessed yet, but it would be good to have it confirmed)
    • Which register returned 1023?  Was it ICC_IAR1 or ICC_IAR0?
      • Note: With the R52, the GIC uses FIQs for interrupts configured as Group 0.  Group 0 interrupts can only be acknowledged via a read of ICC_IAR0
Reply
  • A read of ICC_IARn returns 1023 either when there is no HPPI or the HPPI is one that you can't ack via that register at this time.

    As ICC_HPPIR0 reports 0x1B (27) you know there is a HPPI.  Now, just because there is a HPPI doesn't mean the GIC will signal an IRQ or FIQ to the core.  The HPPI might be masked either by ICC_PMR (priority mask) or ICC_RPR (running priority).  Running priority is derived from the ICC_APxR0_EL1 registers.

    As the irq_exception will not mask FIQ, I suppose that when the CPU is handling vector270 (IRQ), vector27 (FIQ) comes and interrupts it. But as the priority of vector27 is lower than vector270, interrupt1023 is reported due to no sufficient priority. Is my understanding right ?

    Each INTID has a configurable priority, meaning you can't (architecturally) infer the relative of priorities of two interrupts based on their INITDs.  I know on some interrupt controllers INTID and priority are connected, but it is not true for GICs.  If you're see the FIQ exception then that implies the HPPI beat both the PMR and RPR, that means it's higher priority than the already active priority.

    A couple of questions:

    • Are you seeing the FIQ exception be taken?  (I've guessed yet, but it would be good to have it confirmed)
    • Which register returned 1023?  Was it ICC_IAR1 or ICC_IAR0?
      • Note: With the R52, the GIC uses FIQs for interrupts configured as Group 0.  Group 0 interrupts can only be acknowledged via a read of ICC_IAR0
Children