Hi,
I am facing an issue where I am setting timer at Guest EL1 (NS) mode and trying to route this interrupt to EL2.
I do see that when timer expires the interrupt is pending (using generic timer PPI 30) in GICD_ISPENDR (bit 30 set) but control reaches to first entry in EL2 exception vector rather then IRQ handler vector ?
I do set the HCR_EL2 (IMO) bit to 1 in order to route all IRQs. I am confused as how the control can reach to first entry in exception vector (EL2t Synch handler) ?
I am not sure for v8 if is there any extra configuration step ?
Thanks,
Hello,
Are you sure that you aren't actually entering the vector table at the IRQ entry for a lower EL, but then somewhere in your handler you're taking a synchronous exception and this is taking you to that entry? The simplest way to test this would be to put a branch-to-self at the start of each of your vector table entries, then test the code again, then use a debugger to interrupt the core after the timer expires, and then see where the core is.
Please can you try this, and then provide the values of the following registers:
This will help to narrow down the issue.
Ash.
Hi Ash,
I found out the issue was as WFI was trapping. I disabled to trap it in EL2 and it works.
Now i am facing another issue is that even timer condition is asserted it is not generating interrupt.
I would like to know from EL1 (NS) mode is it possible to see GIC GICD_IGROUP registers ?
Is there any document which specify the access permissions for GICv2 registers from different ELx ?
I am trying to narrow down as why the timer interrupt is not firing even though the condition is getting asserted.
The Generic Interrupt Controller Architecture Specification Version 2 (GICv2) documentation can be found here. Note that you'll need to create a free account in order to download the PDF.
From Section 4.3.4 Interrupt Group Registers GICD_IGROUPRn, under usage constraints:
In implementations that include the GIC Security Extensions, accessible by Secure accesses only. The register addresses are RAZ/WI to Non-secure accesses.
So, a few things to keep in mind:
Then, in EL1-NS, you can enable the interrupt by following these steps:
I hope that helps,