Use the generic irq_dispatch.S
This commit is contained in:
parent
6620220d46
commit
b179f9cf73
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: files.footbridge,v 1.10 2002/11/03 21:43:29 chris Exp $
|
||||
# $NetBSD: files.footbridge,v 1.11 2003/01/03 01:06:40 thorpej Exp $
|
||||
#
|
||||
# Shared footbridge files information
|
||||
|
||||
|
@ -9,7 +9,7 @@ file arch/arm/footbridge/footbridge.c footbridge
|
|||
file arch/arm/footbridge/footbridge_machdep.c footbridge
|
||||
file arch/arm/footbridge/footbridge_io.c footbridge
|
||||
file arch/arm/footbridge/footbridge_pci.c footbridge
|
||||
file arch/arm/footbridge/footbridge_irq.S footbridge
|
||||
file arch/arm/arm32/irq_dispatch.S
|
||||
file arch/arm/footbridge/footbridge_irqhandler.c footbridge
|
||||
file arch/arm/footbridge/footbridge_clock.c footbridge
|
||||
file arch/arm/arm/softintr.c footbridge
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: footbridge_intr.h,v 1.3 2002/11/11 20:44:41 chris Exp $ */
|
||||
/* $NetBSD: footbridge_intr.h,v 1.4 2003/01/03 00:56:00 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
|
||||
|
@ -69,6 +69,8 @@
|
|||
|
||||
#define __NEWINTR /* enables new hooks in cpu_fork()/cpu_switch() */
|
||||
|
||||
#define ARM_IRQ_HANDLER _C_LABEL(footbridge_intr_dispatch)
|
||||
|
||||
#ifndef _LOCORE
|
||||
#include <arm/cpufunc.h>
|
||||
|
||||
|
|
|
@ -1,144 +0,0 @@
|
|||
/* $NetBSD: footbridge_irq.S,v 1.5 2003/01/02 23:54:39 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Mark Brinicombe.
|
||||
* Copyright (c) 1998 Causality Limited
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Mark Brinicombe
|
||||
* for the NetBSD Project.
|
||||
* 4. The name of the company nor the name of the author may be used to
|
||||
* endorse or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "opt_irqstats.h"
|
||||
#include "assym.h"
|
||||
|
||||
#include <machine/asm.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/frame.h>
|
||||
#include <arm/footbridge/dc21285mem.h>
|
||||
#include <arm/footbridge/dc21285reg.h>
|
||||
|
||||
/*
|
||||
* irq_entry:
|
||||
*
|
||||
* Main entry point for the IRQ vector on dc21285 CPUs. Calls
|
||||
* external interrupt dispatch routine.
|
||||
*/
|
||||
|
||||
.text
|
||||
.align 0
|
||||
|
||||
.Lcurrent_intr_depth:
|
||||
.word _C_LABEL(current_intr_depth)
|
||||
|
||||
.Lastpending:
|
||||
.word _C_LABEL(astpending)
|
||||
|
||||
ASENTRY_NP(irq_entry)
|
||||
sub lr, lr, #0x00000004 /* Adjust the lr */
|
||||
|
||||
PUSHFRAMEINSVC /* Push an interrupt frame */
|
||||
|
||||
/*
|
||||
* Note that we have entered the IRQ handler.
|
||||
* We are in SVC mode so we cannot use the processor mode
|
||||
* to determine if we are in an IRQ. Instead we will count the
|
||||
* each time the interrupt handler is nested.
|
||||
*/
|
||||
ldr r0, .Lcurrent_intr_depth
|
||||
ldr r1, [r0]
|
||||
add r1, r1, #1
|
||||
str r1, [r0]
|
||||
|
||||
/* branch off into the external handler */
|
||||
mov r0, sp
|
||||
bl _C_LABEL(footbridge_intr_dispatch)
|
||||
|
||||
/* Decremement the nest count. */
|
||||
ldr r0, .Lcurrent_intr_depth
|
||||
ldr r1, [r0]
|
||||
sub r1, r1, #1
|
||||
str r1, [r0]
|
||||
|
||||
/*
|
||||
* If we're returning to user mode, check for pending ASTs.
|
||||
*/
|
||||
ldr r0, [sp] /* Get the SPSR from stack */
|
||||
and r0, r0, #(PSR_MODE) /* Test for USR32 mode before the IRQ */
|
||||
teq r0, #(PSR_USR32_MODE)
|
||||
bne .Lirqout /* Nope, get out now */
|
||||
|
||||
.Lastloop:
|
||||
ldr r0, .Lastpending /* Do we have an AST pending? */
|
||||
ldr r1, [r0]
|
||||
teq r1, #0x00000000
|
||||
beq .Lirqout /* Nope, get out now */
|
||||
|
||||
mov r1, #0x00000000
|
||||
str r1, [r0] /* Clear astpending */
|
||||
|
||||
mrs r4, cpsr /* save CPSR */
|
||||
bic r0, r4, #(I32_bit) /* Enable IRQs */
|
||||
msr cpsr_c, r0
|
||||
|
||||
mov r0, sp
|
||||
bl _C_LABEL(ast) /* ast(frame) */
|
||||
|
||||
msr cpsr_c, r4 /* Disable IRQs */
|
||||
b .Lastloop /* Check for more ASTs */
|
||||
|
||||
.Lirqout:
|
||||
PULLFRAMEFROMSVCANDEXIT
|
||||
movs pc, lr /* Exit */
|
||||
|
||||
.bss
|
||||
.align 0
|
||||
|
||||
.global _C_LABEL(astpending)
|
||||
_C_LABEL(astpending):
|
||||
.word 0
|
||||
|
||||
.global _C_LABEL(current_intr_depth)
|
||||
_C_LABEL(current_intr_depth):
|
||||
.word 0
|
||||
|
||||
/*
|
||||
* XXX Provide intrnames/intrcnt for legacy code, but
|
||||
* don't actually use them.
|
||||
*/
|
||||
|
||||
.global _C_LABEL(intrnames), _C_LABEL(eintrnames)
|
||||
.global _C_LABEL(intrcnt), _C_LABEL(eintrcnt)
|
||||
_C_LABEL(intrnames):
|
||||
_C_LABEL(eintrnames):
|
||||
|
||||
.global _C_LABEL(intrcnt), _C_LABEL(sintrcnt), _C_LABEL(eintrcnt)
|
||||
_C_LABEL(intrcnt):
|
||||
_C_LABEL(eintrcnt):
|
||||
|
||||
/* End of footbridge_irq.S */
|
|
@ -1,10 +1,10 @@
|
|||
# $NetBSD: files.ixp12x0,v 1.2 2002/07/20 03:09:03 ichiro Exp $
|
||||
# $NetBSD: files.ixp12x0,v 1.3 2003/01/03 01:08:00 thorpej Exp $
|
||||
#
|
||||
# Configuration info for Intel IXP12x0 CPU support
|
||||
#
|
||||
|
||||
file arch/arm/ixp12x0/ixp12x0_intr.c
|
||||
file arch/arm/ixp12x0/ixp12x0_irq.S
|
||||
file arch/arm/arm32/irq_dispatch.S
|
||||
|
||||
# IXP1200 Slow peripheral devices
|
||||
device ixpsip { [addr=-1], [size=0], [intr=-1] }: bus_space_generic
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: ixm1200_intr.h,v 1.1 2002/08/17 16:42:23 briggs Exp $ */
|
||||
/* $NetBSD: ixp12x0_intr.h,v 1.1 2003/01/03 01:07:57 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Wasabi Systems, Inc.
|
||||
* Copyright (c) 2002, 2003 Wasabi Systems, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Allen Briggs for Wasabi Systems, Inc.
|
||||
|
@ -35,12 +35,18 @@
|
|||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _IXM1200_INTR_H_
|
||||
#define _IXM1200_INTR_H_
|
||||
#ifndef _IXP12X0_INTR_H_
|
||||
#define _IXP12X0_INTR_H_
|
||||
|
||||
#define ARM_IRQ_HANDLER _C_LABEL(ixp12x0_intr_dispatch)
|
||||
|
||||
#ifndef _LOCORE
|
||||
|
||||
int _splraise(int);
|
||||
int _spllower(int);
|
||||
void splx(int);
|
||||
void _setsoftintr(int);
|
||||
|
||||
#endif /* _IXM1200_INTR_H_ */
|
||||
#endif /* ! _LOCORE */
|
||||
|
||||
#endif /* _IXP12X0_INTR_H_ */
|
|
@ -1,145 +0,0 @@
|
|||
/* $NetBSD: ixp12x0_irq.S,v 1.4 2003/01/02 23:54:41 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Wasabi Systems, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Jason R. Thorpe for Wasabi Systems, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed for the NetBSD Project by
|
||||
* Wasabi Systems, Inc.
|
||||
* 4. The name of Wasabi Systems, Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "assym.h"
|
||||
|
||||
#include <machine/asm.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/frame.h>
|
||||
|
||||
/*
|
||||
* irq_entry:
|
||||
*
|
||||
* Main entry point for the IRQ vector.
|
||||
*/
|
||||
|
||||
.text
|
||||
.align 0
|
||||
|
||||
Lcurrent_intr_depth:
|
||||
.word _C_LABEL(current_intr_depth)
|
||||
|
||||
Lintr_dispatch:
|
||||
.word _C_LABEL(ixp12x0_intr_dispatch)
|
||||
|
||||
Lastpending:
|
||||
.word _C_LABEL(astpending)
|
||||
|
||||
ASENTRY_NP(irq_entry)
|
||||
sub lr, lr, #0x00000004 /* Adjust the lr */
|
||||
|
||||
PUSHFRAMEINSVC /* Push an interrupt frame */
|
||||
|
||||
/*
|
||||
* Note that we have entered the IRQ handler. We are
|
||||
* in SVC mode so we cannot use the processor mode to
|
||||
* determine if we are in an IRQ. Instead, we will
|
||||
* count each time the interrupt handler is nested.
|
||||
*/
|
||||
ldr r0, Lcurrent_intr_depth
|
||||
ldr r1, [r0]
|
||||
add r1, r1, #1
|
||||
str r1, [r0]
|
||||
|
||||
/*
|
||||
* Call the C interrupt dispatch routine.
|
||||
*/
|
||||
mov r0, sp
|
||||
mov lr, pc
|
||||
ldr pc, Lintr_dispatch
|
||||
|
||||
/* Decremement the nest count. */
|
||||
ldr r0, Lcurrent_intr_depth
|
||||
ldr r1, [r0]
|
||||
sub r1, r1, #1
|
||||
str r1, [r0]
|
||||
|
||||
/*
|
||||
* If we're returning to user mode, check for pending ASTs.
|
||||
*/
|
||||
ldr r0, [sp] /* Get the SPSR from stack */
|
||||
and r0, r0, #(PSR_MODE) /* Test for USR32 mode before the IRQ */
|
||||
teq r0, #(PSR_USR32_MODE)
|
||||
bne Lirqout /* Nope, get out now */
|
||||
|
||||
Lastloop:
|
||||
ldr r0, Lastpending /* Do we have an AST pending? */
|
||||
ldr r1, [r0]
|
||||
teq r1, #0x00000000
|
||||
beq Lirqout /* Nope, get out now */
|
||||
|
||||
mov r1, #0x00000000
|
||||
str r1, [r0] /* Clear astpending */
|
||||
|
||||
mrs r4, cpsr /* save CPSR */
|
||||
bic r0, r4, #(I32_bit) /* Enable IRQs */
|
||||
msr cpsr_c, r0
|
||||
|
||||
mov r0, sp
|
||||
bl _C_LABEL(ast) /* ast(frame) */
|
||||
|
||||
msr cpsr_c, r4 /* Disable IRQs */
|
||||
b Lastloop /* Check for more ASTs */
|
||||
|
||||
Lirqout:
|
||||
PULLFRAMEFROMSVCANDEXIT
|
||||
movs pc, lr /* Exit */
|
||||
|
||||
.bss
|
||||
.align 0
|
||||
|
||||
.global _C_LABEL(astpending)
|
||||
_C_LABEL(astpending):
|
||||
.word 0
|
||||
|
||||
.global _C_LABEL(current_intr_depth)
|
||||
_C_LABEL(current_intr_depth):
|
||||
.word 0
|
||||
|
||||
/*
|
||||
* XXX Provide intrnames/intrcnt for legacy code, but
|
||||
* don't actually use them.
|
||||
*/
|
||||
|
||||
.global _C_LABEL(intrnames), _C_LABEL(eintrnames)
|
||||
.global _C_LABEL(intrcnt), _C_LABEL(eintrcnt)
|
||||
_C_LABEL(intrnames):
|
||||
_C_LABEL(eintrnames):
|
||||
|
||||
.global _C_LABEL(intrcnt), _C_LABEL(sintrcnt), _C_LABEL(eintrcnt)
|
||||
_C_LABEL(intrcnt):
|
||||
_C_LABEL(eintrcnt):
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: files.pxa2x0,v 1.2 2002/12/20 01:10:11 bsh Exp $
|
||||
# $NetBSD: files.pxa2x0,v 1.3 2003/01/03 01:13:58 thorpej Exp $
|
||||
#
|
||||
# Configuration info for Intel PXA2[51]0 CPU support
|
||||
#
|
||||
|
@ -10,7 +10,7 @@ device pxaip { [addr=-1], [size=0], [intr=-1], [gpio=-1], [index=-1]} : bus_spac
|
|||
attach pxaip at mainbus
|
||||
file arch/arm/xscale/pxa2x0.c
|
||||
file arch/arm/xscale/pxa2x0_intr.c
|
||||
file arch/arm/xscale/pxa2x0_irq.S
|
||||
file arch/arm/arm32/irq_dispatch.S
|
||||
file arch/arm/xscale/pxa2x0_space.c
|
||||
#file arch/arm/xscale/pxa2x0_freqchg.S
|
||||
file arch/arm/xscale/pxa2x0_dma.c
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pxa2x0_intr.c,v 1.1 2002/10/19 19:31:39 bsh Exp $ */
|
||||
/* $NetBSD: pxa2x0_intr.c,v 1.2 2003/01/03 01:13:58 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Genetec Corporation. All rights reserved.
|
||||
|
@ -79,8 +79,6 @@ __volatile int intr_mask;
|
|||
int pxa2x0_imask[NIPL];
|
||||
static int extirq_level[ICU_LEN];
|
||||
|
||||
int current_intr_depth;
|
||||
|
||||
static __inline void
|
||||
__raise(int ipl)
|
||||
{
|
||||
|
@ -110,7 +108,6 @@ pxa2x0_irq_handler(struct clockframe *frame)
|
|||
int irqno;
|
||||
int saved_spl_level;
|
||||
|
||||
++current_intr_depth;
|
||||
saved_spl_level = current_spl_level;
|
||||
|
||||
/* get pending IRQs */
|
||||
|
@ -147,8 +144,6 @@ pxa2x0_irq_handler(struct clockframe *frame)
|
|||
|
||||
if( softint_pending & intr_mask )
|
||||
pxa2x0_do_pending();
|
||||
|
||||
--current_intr_depth;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pxa2x0_intr.h,v 1.1 2002/10/19 19:31:39 bsh Exp $ */
|
||||
/* $NetBSD: pxa2x0_intr.h,v 1.2 2003/01/03 01:13:59 thorpej Exp $ */
|
||||
|
||||
/* Derived from i80321_intr.h */
|
||||
|
||||
|
@ -40,6 +40,10 @@
|
|||
#ifndef _PXA2X0_INTR_H_
|
||||
#define _PXA2X0_INTR_H_
|
||||
|
||||
#define ARM_IRQ_HANDLER _C_LABEL(pxa2x0_irq_handler)
|
||||
|
||||
#ifndef _LOCORE
|
||||
|
||||
#include <arm/cpu.h>
|
||||
#include <arm/armreg.h>
|
||||
#include <arm/cpufunc.h>
|
||||
|
@ -158,4 +162,6 @@ void _setsoftintr(int);
|
|||
|
||||
#endif /* !EVBARM_SPL_NOINTR */
|
||||
|
||||
#endif /* ! _LOCORE */
|
||||
|
||||
#endif _PXA2X0_INTR_H_
|
||||
|
|
|
@ -1,116 +0,0 @@
|
|||
/* $NetBSD: pxa2x0_irq.S,v 1.1 2002/10/19 19:31:40 bsh Exp $ */
|
||||
|
||||
/*
|
||||
* This code is derived from i80200_irq.S by Jason R. Thorpe.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2002 Wasabi Systems, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Jason R. Thorpe for Wasabi Systems, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed for the NetBSD Project by
|
||||
* Wasabi Systems, Inc.
|
||||
* 4. The name of Wasabi Systems, Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "assym.h"
|
||||
|
||||
#include <machine/asm.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/frame.h>
|
||||
|
||||
/*
|
||||
* irq_entry:
|
||||
* Main entry point for the IRQ vector.
|
||||
*/
|
||||
|
||||
.text
|
||||
.align 0
|
||||
Lastpending:
|
||||
.word _C_LABEL(astpending)
|
||||
|
||||
ASENTRY_NP(irq_entry)
|
||||
sub lr, lr, #0x00000004 /* Adjust the lr */
|
||||
|
||||
PUSHFRAMEINSVC /* Push an interrupt frame */
|
||||
|
||||
mov r0, sp
|
||||
bl _C_LABEL(pxa2x0_irq_handler)
|
||||
1:
|
||||
|
||||
/*
|
||||
* If we're returning to user mode, check for pending ASTs.
|
||||
*/
|
||||
ldr r0, [sp] /* Get the SPSR from stack */
|
||||
and r0, r0, #(PSR_MODE) /* Test for USR32 mode before the IRQ */
|
||||
teq r0, #(PSR_USR32_MODE)
|
||||
bne Lirqout /* Nope, get out now */
|
||||
|
||||
Lastloop:
|
||||
ldr r0, Lastpending /* Do we have an AST pending? */
|
||||
ldr r1, [r0]
|
||||
teq r1, #0x00000000
|
||||
beq Lirqout /* Nope, get out now */
|
||||
|
||||
mov r1, #0x00000000
|
||||
str r1, [r0] /* Clear astpending */
|
||||
|
||||
mrs r4, cpsr_all /* save CPSR */
|
||||
bic r0, r4, #(I32_bit) /* Enable IRQs */
|
||||
msr cpsr_all, r0
|
||||
|
||||
mov r0, sp
|
||||
bl _C_LABEL(ast) /* ast(frame) */
|
||||
|
||||
msr cpsr_all, r4 /* Disable IRQs */
|
||||
b Lastloop /* Check for more ASTs */
|
||||
|
||||
Lirqout:
|
||||
PULLFRAMEFROMSVCANDEXIT
|
||||
movs pc, lr /* Exit */
|
||||
|
||||
.bss
|
||||
.align 0
|
||||
|
||||
.global _C_LABEL(astpending)
|
||||
_C_LABEL(astpending):
|
||||
.word 0
|
||||
|
||||
/*
|
||||
* XXX Provide intrnames/intrcnt for legacy code, but
|
||||
* don't actually use them.
|
||||
*/
|
||||
|
||||
.global _C_LABEL(intrnames), _C_LABEL(eintrnames)
|
||||
.global _C_LABEL(intrcnt), _C_LABEL(eintrcnt)
|
||||
_C_LABEL(intrnames):
|
||||
_C_LABEL(eintrnames):
|
||||
|
||||
.global _C_LABEL(intrcnt), _C_LABEL(sintrcnt), _C_LABEL(eintrcnt)
|
||||
_C_LABEL(intrcnt):
|
||||
_C_LABEL(eintrcnt):
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: std.cats,v 1.2 2001/11/20 12:56:23 lukem Exp $
|
||||
# $NetBSD: std.cats,v 1.3 2003/01/03 00:56:01 thorpej Exp $
|
||||
#
|
||||
# standard NetBSD/cats options
|
||||
|
||||
|
@ -10,3 +10,5 @@ options EXEC_ELF32
|
|||
|
||||
# To support easy transit to ../arch/arm/arm32
|
||||
options ARM32
|
||||
|
||||
options ARM_INTR_IMPL="<arm/footbridge/footbridge_intr.h>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: std.ixm1200,v 1.3 2003/01/02 23:38:02 thorpej Exp $
|
||||
# $NetBSD: std.ixm1200,v 1.4 2003/01/03 01:08:04 thorpej Exp $
|
||||
#
|
||||
# standard NetBSD/evbarm for IXM1200 options
|
||||
|
||||
|
@ -17,7 +17,7 @@ options ARM32
|
|||
makeoptions LOADADDRESS="0xC0200000"
|
||||
makeoptions BOARDTYPE="ixm1200"
|
||||
|
||||
options ARM_INTR_IMPL="<arch/evbarm/ixm1200/ixm1200_intr.h>"
|
||||
options ARM_INTR_IMPL="<arch/arm/ixp12x0/ixp12x0_intr.h>"
|
||||
|
||||
# We need to configure the PCI bus.
|
||||
options PCI_NETBSD_CONFIGURE
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: std.netwinder,v 1.8 2001/12/09 05:00:47 atatat Exp $
|
||||
# $NetBSD: std.netwinder,v 1.9 2003/01/03 00:56:02 thorpej Exp $
|
||||
#
|
||||
# standard NetBSD/netwinder options
|
||||
|
||||
|
@ -11,5 +11,7 @@ options EXEC_ELF32
|
|||
# To support easy transit to ../arch/arm/arm32
|
||||
options ARM32
|
||||
|
||||
options ARM_INTR_IMPL="<arm/footbridge/footbridge_intr.h>"
|
||||
|
||||
makeoptions LOADADDRESS="0xF000C000"
|
||||
makeoptions ENTRYPOINT="nwstart"
|
||||
|
|
Loading…
Reference in New Issue