Skip to content

Commit

Permalink
Fix FIQ mask for the native interrupt handler for arm32
Browse files Browse the repository at this point in the history
In Arm aarch32 mode, FIQ is not masked by hardware in IRQ mode.
For GICv2, IRQ is for foreign interrupt and already masked by hardware
in FIQ mode which is used for native interrupt.
For GICv3, FIQ is for foreign interrupt. It's not masked by hardware in
IRQ mode which is used for natvie interrupt. We need to mask it explicitly.

Signed-off-by: David Wang <david.wang@arm.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
David Wang committed Aug 25, 2017
1 parent cc1a3f8 commit 52549f0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/arch/arm/kernel/thread_a32.S
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,16 @@ END_FUNC thread_rpc

/* The handler of native interrupt. */
.macro native_intr_handler mode:req
.ifc \mode\(),irq
/*
* Foreign interrupts should be masked.
* For GICv2, IRQ is for foreign interrupt and already masked by
* hardware in FIQ mode which is used for native interrupt.
* For GICv3, FIQ is for foreign interrupt. It's not masked by hardware
* in IRQ mode which is used for natvie interrupt.
*/
cpsid f
.endif
/*
* FIQ and IRQ have a +4 offset for lr compared to preferred return
* address
Expand Down

0 comments on commit 52549f0

Please sign in to comment.