We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
First Part - EL3 Group1 SGI issue
I successfully developed a validation test, which makes A72 trigger and handle non-secure group1 SGI number 0~15 at EL3.
But I have some problem. At EL3.
Why SGI0~15 are generated by same register, but can be handled only when assigned to different group?
When I generate SGI by writing ICC_SGI1R_EL1 and ICC_ASGI1R_EL1 at EL3, how should I correctly group them?
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Second Part - Group1 SGI from EL3 to EL1
Now, ignoring this question, I want to let A72 trigger and handle Non-secure group1 SGI test at EL1 Non-secure state.
But I after I configure register at EL3 as showed below, and change El3 to EL1, interrupt can't be handled. What step I still miss?
uint32_t reg; reg = get_SCR_EL3(); reg &= ~(1<<2);//clear fiq reg &= ~(1<<1);//clear irq set_SCR_EL3(reg); reg = get_HCR_EL2(); reg &= ~(1<<4);//clear FMO reg &= ~(1<<3);//clear IMO set_HCR_EL2(reg); el3_config_to_non_secure(); transition_to_lower_el(EL3, EL2); transition_to_lower_el(EL2, EL1);
There's unfortunately not enough information in code snippet you shared to answer. Here are some things that I would check:
Assuming all of that checks out, when you think you should be getting an interrupt:
Also... you probably don't want SCR_EL3.FIQ cleared while in Non-secure state. In GICv3, FIQ is used for G0 interrupts and interrupts for the "other" Security state. Meaning in NS state, FIQs will either be G0 interrupts or SG1 interrupts - neither of which you can really manage in Non-secure state.
Hi Martin,
Thanks for your so detail explanation about the second question, I will check them one by one, and feedback to you.