I am using Linaro's Android release on Juno r1. I noticed that there are 6 user push buttons on the board, and I am trying to use the buttons to trigger a world switch (from non-secure to secure).
Firstly I found the interrupt id for the push buttons on SoC maunal, it seems that all 6 buttons share the same interrupt id 195. Then I added the following lines to configure the interrupt 195 to be a secure interrupt,
file: arm-tf/drivers/arm/gic/arm_gic.c
function: arm_gic_distif_setup
gicd_set_igroupr(g_gicd_base, 195); gicd_set_isenabler(g_gicd_base, 195);
After that, i thought that the interrupt should be routed to EL3 first. And also, to learn how the secure interrupt works, i added logs in all functions in arm-tf/plat/common/plat_gic.c. However, when i press the buttons, nothing happened.
My first question is what is the difference between the "Interrupt ID" and the "GIC IRQ ID" listed in the Juno Technical Reference Manual, Table 2-5. They are different values, and i am a litter confusion about it.
Then about the GICD_IGROUPR. From the GIC manual, the description of GICD_IGROUPR tells that these registers works for interrupt 0-31. So the interrupt 195 is out of the scope. What is the correct way to
route the interrupt of push buttons to EL3?
Thanks for any help!
Regards,
Zhenyu
The GICD_IGROUPRn registers are accessible from Secure state. That means that Linux/Android (running in Non-secure state) cannot make an interrupt Secure. The Secure software would have to do this.
View all questions in Arm Development Platforms forum