From f7efa925fd570f87e3fb04a7f776a9130953f366 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Sun, 2 Feb 2014 04:24:40 +0100 Subject: imx233: add support for nested IRQ Rewrite IRQ handling to allow nested IRQs: on each IRQ entry, we save the parameters on the (IRQ) stack and then switch to SVC mode (with its own stack) and renable interrupts. Make sure interrupt is properly acknowledged by using the read side-effect (RSE) mode and handle priority levels as well. Change-Id: I3fd68289b430c56bdd256868939238ff268e42b4 --- firmware/target/arm/imx233/crt0.S | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'firmware/target/arm/imx233/crt0.S') diff --git a/firmware/target/arm/imx233/crt0.S b/firmware/target/arm/imx233/crt0.S index ffc58d56fc..0a71da5d08 100644 --- a/firmware/target/arm/imx233/crt0.S +++ b/firmware/target/arm/imx233/crt0.S @@ -132,11 +132,12 @@ remap: /* Set up stack for FIQ mode */ msr cpsr_c, #0xd1 - ldr sp, =fiq_stack + ldr sp, =irq_stack - /* Let svc, abort and undefined modes use irq stack */ + /* Let abort and undefined modes use irq stack, svc uses its own stack + * for interrupt processing */ msr cpsr_c, #0xd3 - ldr sp, =irq_stack + ldr sp, =svc_stack msr cpsr_c, #0xd7 ldr sp, =irq_stack msr cpsr_c, #0xdb @@ -161,11 +162,13 @@ remap: 1: b 1b +/* Cache-align interrupt stacks */ + .balign 32 /* 256 words of IRQ stack */ .space 256*4 irq_stack: /* 256 words of FIQ stack */ .space 256*4 -fiq_stack: +svc_stack: end: -- cgit v1.2.3