This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

IRQ doesn't call exception table

Hi,

I'm trying to setup the physical non secure timer.

I'm in EL1 ttbr1, core0 and got there thorugh el2 so I can't modify or read SCR_EL3 but cleared HCR_EL2 so IMO, FIMO and AMO are set to 0.

I'm enabling the time like the flollwing:

    asm volatile ("mrs x1, CNTFRQ_EL0");
    asm volatile ("msr CNTP_TVAL_EL0, x1");

    asm volatile ("mov x0, 1");
    asm volatile ("msr cntp_ctl_el0, x0");

And then enabling gicc/gicd, setting the priorities and enabling int 30.

When I call a svc exception my exception table vector gets called, so I would expect the same for the timer.

But when the timer is triggered (which I'm checking with ISR_EL1 and cntp_ctl_el0) none of my functions in the exception vector is called.

DAIF is set to all 0 but ISR_EL1 does not indicate an pending irq anymore, when I set daif serror to 1. so maybe there is an exception in the timer irq call? If so, what can cause such a behavior?

greets from germany!

Parents
  • Do you see that the timer has fired? That is, if you read CNTP_CTL_EL0, does the ISTATUS field return 1?

    If no: then the timer hasn't fired, which is why you didn't get an interrupt.  It might be you didn't wait long enough, or that the system counter isn't initialised.

    If yes: then I suspect the problem is with your GIC set up.  First check whether GICR_ISPENDR0 shows that INTID 30 is pending (or GICD_ISPENDR0 if using GICv2)

    You might also want to take a look at the Generic Timer guide on the Learn the Architecture page.  It includes a (very) simple example of initialising the timer and generating an interrupt (with GICv3).  That examples at EL3 and is bare metal, but it might useful as a reference.

Reply
  • Do you see that the timer has fired? That is, if you read CNTP_CTL_EL0, does the ISTATUS field return 1?

    If no: then the timer hasn't fired, which is why you didn't get an interrupt.  It might be you didn't wait long enough, or that the system counter isn't initialised.

    If yes: then I suspect the problem is with your GIC set up.  First check whether GICR_ISPENDR0 shows that INTID 30 is pending (or GICD_ISPENDR0 if using GICv2)

    You might also want to take a look at the Generic Timer guide on the Learn the Architecture page.  It includes a (very) simple example of initialising the timer and generating an interrupt (with GICv3).  That examples at EL3 and is bare metal, but it might useful as a reference.

Children