OP-TEE / optee_os

Trusted side of the TEE
Other
1.51k stars 1.03k forks source link

core: interrupts: add interrupt_release api for reset properties #6907

Open ChenRunyang opened 1 week ago

ChenRunyang commented 1 week ago

This patch introduces a interrupt_release API to reset the properties of an interrupt to its previous settings. This functionality is essential for scenarios where a specific interrupt needs to be dynamically set to either Group 1 Secure (G1S) or Group 1 Non-Secure (G1NS) at different times.

ChenRunyang commented 5 days ago

I've not fully dug into the implication of this feature. That said, here are some comments. Also, I wonder it interrupt_release() would be a better label, rather than interrupt_reset().

Replaced the label from interrupt_reset to interrupt_release.

ChenRunyang commented 3 days ago

I wonder if this doesn't boil to changing the group assignment of the interrupt id. As long as the interrupt is disabled we could leave it to the previous owner to restore the other properties.

Yes, it will change the group assignment of the interrupt id. Updated the gic_op_release API to accept additional properties as parameters. These settings will be restored to their previous state by the original owner.