We know that the functions to enable or disable interrupts in Linux Kernel are: local_irq_enable() and local_irq_disable(), so how to do it in optee os?
In optee, interrupts are turned on or off by using thread_mask_exceptions() and thread_unmask_exceptions().
The implementation of the thread_mask_exceptions() and thread_unmask_exceptions() functions is as follows:
#define ARM32_CPSR_F_SHIFT U(6)
#define ARM32_CPSR_F