diff options
author | David Wang <david.wang@arm.com> | 2016-12-12 16:06:17 +0800 |
---|---|---|
committer | David Wang <david.wang@arm.com> | 2017-02-28 15:59:37 +0800 |
commit | 5acb1bc6e8ece254ffe7dbdc41605ad5613b6ab7 (patch) | |
tree | 0fb79682fc8744ef2f2a0e326c48e2deb2f83186 /lib/libutils/isoc/bget_malloc.c | |
parent | 849b17bd15c53480b42dacedeb00fdfdf0854064 (diff) |
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 <david.wang@arm.com>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (b2260)
Diffstat (limited to 'lib/libutils/isoc/bget_malloc.c')
-rw-r--r-- | lib/libutils/isoc/bget_malloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |