From 5acb1bc6e8ece254ffe7dbdc41605ad5613b6ab7 Mon Sep 17 00:00:00 2001 From: David Wang Date: Mon, 12 Dec 2016 16:06:17 +0800 Subject: Rename the secure and non-secure interrupts Currently, the secure interrupts are named as FIQ and the non-secure interrupts are named as IRQ. In GICv3 mode, the FIQ and IRQ have different definitions. * Secure Group 0 interrupts: Handled by EL3 and triggered by FIQ when running at Secure EL0/1. * Secure Group 1 interrupts: Handled by optee_os and triggered by IRQ when running at Secure EL0/1. * Non-secure Group1 interrupts: Handled by the rich os and triggered by FIQ when running at Secure EL0/1. The "Secure Group 1" interrupts are the "native" interrupts handled by optee_os. They are same as the "secure" interrupts used in optee_os for now. But they are triggered by FIQ in GICv2 mode while by IRQ in GICv3 mode. The "Secure Group 0" and "Non-secure Group1" interrupts are the "foreign" interrupts that will cause the exiting of optee_os. (e.g. switch back to normal world) The "Non-secure Group1" interrupts are same as the "non-secure"interrupts used in optee_os for now. But they are triggered by IRQ in GICv2 mode while by FIQ in GICv3 mode. This patch renames these interrupts to the generic names - "Foreign interrupts" and "Native interrupts". For the support of GICv3 mode in the future, we can redefine the macros of "native interrupt" and "foreign interrupt" to IRQ and FIQ. Signed-off-by: David Wang Reviewed-by: Joakim Bech Reviewed-by: Jens Wiklander Reviewed-by: Etienne Carriere Tested-by: Etienne Carriere (b2260) --- lib/libutils/isoc/bget_malloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libutils/isoc') diff --git a/lib/libutils/isoc/bget_malloc.c b/lib/libutils/isoc/bget_malloc.c index 9cb2751a..a4f77595 100644 --- a/lib/libutils/isoc/bget_malloc.c +++ b/lib/libutils/isoc/bget_malloc.c @@ -117,7 +117,8 @@ static uint32_t malloc_lock(void) { uint32_t exceptions; - exceptions = thread_mask_exceptions(THREAD_EXCP_IRQ | THREAD_EXCP_FIQ); + exceptions = thread_mask_exceptions( + THREAD_EXCP_NATIVE_INTR | THREAD_EXCP_FOREIGN_INTR); cpu_spin_lock(&__malloc_spinlock); return exceptions; } -- cgit v1.2.3