1129198Scognet/* $NetBSD: irq_dispatch.S,v 1.5 2003/10/30 08:57:24 scw Exp $ */ 2129198Scognet 3139735Simp/*- 4129198Scognet * Copyright (c) 2002 Fujitsu Component Limited 5129198Scognet * Copyright (c) 2002 Genetec Corporation 6129198Scognet * All rights reserved. 7129198Scognet * 8129198Scognet * Redistribution and use in source and binary forms, with or without 9129198Scognet * modification, are permitted provided that the following conditions 10129198Scognet * are met: 11129198Scognet * 1. Redistributions of source code must retain the above copyright 12129198Scognet * notice, this list of conditions and the following disclaimer. 13129198Scognet * 2. Redistributions in binary form must reproduce the above copyright 14129198Scognet * notice, this list of conditions and the following disclaimer in the 15129198Scognet * documentation and/or other materials provided with the distribution. 16129198Scognet * 3. Neither the name of The Fujitsu Component Limited nor the name of 17129198Scognet * Genetec corporation may not be used to endorse or promote products 18129198Scognet * derived from this software without specific prior written permission. 19129198Scognet * 20129198Scognet * THIS SOFTWARE IS PROVIDED BY FUJITSU COMPONENT LIMITED AND GENETEC 21129198Scognet * CORPORATION ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 22129198Scognet * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23129198Scognet * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24129198Scognet * DISCLAIMED. IN NO EVENT SHALL FUJITSU COMPONENT LIMITED OR GENETEC 25129198Scognet * CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26129198Scognet * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27129198Scognet * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 28129198Scognet * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 29129198Scognet * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 30129198Scognet * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 31129198Scognet * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32129198Scognet * SUCH DAMAGE. 33129198Scognet * 34129198Scognet */ 35129198Scognet 36139735Simp/*- 37129198Scognet * Copyright (c) 2002, 2003 Wasabi Systems, Inc. 38129198Scognet * All rights reserved. 39129198Scognet * 40129198Scognet * Written by Jason R. Thorpe for Wasabi Systems, Inc. 41129198Scognet * 42129198Scognet * Redistribution and use in source and binary forms, with or without 43129198Scognet * modification, are permitted provided that the following conditions 44129198Scognet * are met: 45129198Scognet * 1. Redistributions of source code must retain the above copyright 46129198Scognet * notice, this list of conditions and the following disclaimer. 47129198Scognet * 2. Redistributions in binary form must reproduce the above copyright 48129198Scognet * notice, this list of conditions and the following disclaimer in the 49129198Scognet * documentation and/or other materials provided with the distribution. 50129198Scognet * 3. All advertising materials mentioning features or use of this software 51129198Scognet * must display the following acknowledgement: 52129198Scognet * This product includes software developed for the NetBSD Project by 53129198Scognet * Wasabi Systems, Inc. 54129198Scognet * 4. The name of Wasabi Systems, Inc. may not be used to endorse 55129198Scognet * or promote products derived from this software without specific prior 56129198Scognet * written permission. 57129198Scognet * 58129198Scognet * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 59129198Scognet * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 60129198Scognet * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 61129198Scognet * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 62129198Scognet * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 63129198Scognet * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 64129198Scognet * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 65129198Scognet * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 66129198Scognet * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 67129198Scognet * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 68129198Scognet * POSSIBILITY OF SUCH DAMAGE. 69129198Scognet */ 70129198Scognet 71129198Scognet#include "assym.s" 72129198Scognet#include <machine/asm.h> 73129198Scognet#include <machine/asmacros.h> 74129198Scognet#include <machine/armreg.h> 75129198Scognet__FBSDID("$FreeBSD$"); 76129198Scognet 77129198Scognet/* 78129198Scognet * irq_entry: 79129198Scognet * Main entry point for the IRQ vector. This is a generic version 80129198Scognet * which can be used by different platforms. 81129198Scognet */ 82129198Scognet .text 83129198Scognet .align 0 84135650Scognet 85129198Scognet.Lcurrent_intr_depth: 86129198Scognet .word _C_LABEL(current_intr_depth) 87135650ScognetAST_LOCALS 88129198Scognet 89129198ScognetASENTRY_NP(irq_entry) 90129198Scognet sub lr, lr, #0x00000004 /* Adjust the lr */ 91129198Scognet PUSHFRAMEINSVC /* Push an interrupt frame */ 92254845Sandrew UNWINDSVCFRAME 93129198Scognet mov r0, sp /* arg for dispatcher */ 94129198Scognet 95135650Scognet mov r1, #0 96135650Scognet bl _C_LABEL(arm_handler_execute) 97129198Scognet 98135650Scognet DO_AST 99129198Scognet PULLFRAMEFROMSVCANDEXIT 100129198Scognet movs pc, lr /* Exit */ 101248361SandrewEND(irq_entry) 102129198Scognet 103228504Sraj .data 104129198Scognet .align 0 105129198Scognet 106224187Sattilio .global _C_LABEL(intrnames), _C_LABEL(sintrnames) 107224187Sattilio .global _C_LABEL(intrcnt), _C_LABEL(sintrcnt) 108236991Simp_C_LABEL(intrnames): 109137629Scognet .space NIRQ * (MAXCOMLEN + 1) 110129198Scognet_C_LABEL(intrcnt): 111137629Scognet .space NIRQ * 4 112224187Sattilio_C_LABEL(sintrnames): 113224612Sattilio .int NIRQ * (MAXCOMLEN + 1) 114224187Sattilio_C_LABEL(sintrcnt): 115224612Sattilio .int NIRQ * 4 116135650Scognet 117135650Scognet .global _C_LABEL(current_intr_depth) 118135650Scognet_C_LABEL(current_intr_depth): 119135650Scognet .word 0 120135650Scognet 121