summaryrefslogtreecommitdiffstats
path: root/sys/arm/sa11x0/sa11x0_irq.S
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-05-17 13:53:38 +0000
committerian <ian@FreeBSD.org>2014-05-17 13:53:38 +0000
commitf51629e24e56540c52920e2b0e3fa2eddb3c8bed (patch)
tree21720b45d81bf613d158521e59271dd9e921cd76 /sys/arm/sa11x0/sa11x0_irq.S
parent6341a2d92b98c830653de9c38705ec3321702a1e (diff)
downloadFreeBSD-src-f51629e24e56540c52920e2b0e3fa2eddb3c8bed.zip
FreeBSD-src-f51629e24e56540c52920e2b0e3fa2eddb3c8bed.tar.gz
MFC 262952, 262958, 262966, 262979, 262980, 262986, 262987, 262995, 262997,
263030, 263033, 263034, 263056, 263057, Remove all the redundant external declarations of exception vectors and runtime setting of the pointers that's scattered around various places. Remove all traces of support for ARM chips prior to the arm9 series. Make the default exception handler vectors point to where I thought they were already pointing: the default handlers (not a panic that says there is no default handler). Eliminate irq_dispatch.S. Move the data items it contained into arm/intr.c and the functionality it provided into arm/exception.S. Move the exception vector table (so-called "page0" data) into exception.S and eliminate vectors.S. Change the way the asm GET_CURTHREAD_PTR() macro is defined so that code using it doesn't have to have an "AST_LOCALS" macro somewhere in the file. Arrange for arm fork_trampoline() to return to userland via the standard swi_exit code in exception.S instead of having its own inline expansion of the DO_AST and PULLFRAME macros. Now that the PUSHFRAME and PULLFRAME macros are used only in the swi entry/exit code, they don't need to be macros. Except that didn't work and the whole change was reverted. Remove some unnecessary indirection and jump right to the handler functions. Use panic rather than printf to "handle" an arm26 address exception (should never happen on arm32). Remove the unreferenced DATA() macro. Remove #include <machine/asmacros.h> from files that don't need it.
Diffstat (limited to 'sys/arm/sa11x0/sa11x0_irq.S')
-rw-r--r--sys/arm/sa11x0/sa11x0_irq.S133
1 files changed, 0 insertions, 133 deletions
diff --git a/sys/arm/sa11x0/sa11x0_irq.S b/sys/arm/sa11x0/sa11x0_irq.S
deleted file mode 100644
index 4494f6a..0000000
--- a/sys/arm/sa11x0/sa11x0_irq.S
+++ /dev/null
@@ -1,133 +0,0 @@
-/* $NetBSD: sa11x0_irq.S,v 1.5 2003/03/31 19:52:35 chris Exp $ */
-
-/*-
- * Copyright (c) 1998 Mark Brinicombe.
- * Copyright (c) 1998 Causality Limited
- * All rights reserved.
- *
- * This code is derived from software contributed to the NetBSD Foundation
- * by IWAMOTO Toshihiro.
- *
- * 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.
- *
- * 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 "assym.s"
-#include <machine/asm.h>
-#include <machine/armreg.h>
-#include <machine/asmacros.h>
-#include <arm/sa11x0/sa11x0_reg.h>
-__FBSDID("$FreeBSD$");
-Lcurrent_intr_depth:
- .word _C_LABEL(current_intr_depth)
-
- .globl _C_LABEL(saipic_base)
-_C_LABEL(saipic_base):
- .word 0x00000000
-
-#ifdef INTR_DEBUG
-Ldbg_str:
- .asciz "irq_entry %x %x\n"
-#endif
-
-AST_LOCALS
-/*
- * Regsister usage
- *
- * r6 - Address of current handler
- * r7 - Pointer to handler pointer list
- * r8 - Current IRQ requests.
- * r9 - Used to count through possible IRQ bits.
- * r10 - Base address of SAIP
- */
-
-ASENTRY_NP(irq_entry)
- sub lr, lr, #0x00000004 /* Adjust the lr */
-
- PUSHFRAMEINSVC /* Push an interrupt frame */
-
- /* Load r8 with the SAIPIC interrupt requests */
-
- ldr r10, _C_LABEL(saipic_base)
- ldr r8, [r10, #(SAIPIC_IP)] /* Load IRQ pending register */
-
-#ifdef INTR_DEBUG
- ldr r2, [r10, #(SAIPIC_MR)]
- adr r0, Ldbg_str
- mov r1, r8
- bl _C_LABEL(printf)
-#endif
- /*
- * 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]
-
- mov r0, sp
- mov r1, r8
- bl _C_LABEL(arm_handler_execute)
-
-#ifdef INTR_DEBUG
- adr r0, Ldbg_str
- mov r1, #3
- ldr r2, [r10, #(SAIPIC_MR)]
- bl _C_LABEL(printf)
-#endif
-
- /* Decrement the nest count */
- ldr r0, Lcurrent_intr_depth
- ldr r1, [r0]
- sub r1, r1, #1
- str r1, [r0]
-
- DO_AST
- PULLFRAMEFROMSVCANDEXIT
-
- /* NOT REACHED */
- b . - 8
-Lcnt:
- .word _C_LABEL(cnt)
-
-ENTRY(sa11x0_activateirqs)
- ldr r0, _C_LABEL(saipic_base)
- mov r1, #0xffffffff
- str r1, [r0, #(SAIPIC_MR)]
- mov pc, lr
-
- .global _C_LABEL(intrnames), _C_LABEL(sintrnames)
-_C_LABEL(intrnames):
-_C_LABEL(sintrnames):
- .int 0
-
- .globl _C_LABEL(intrcnt), _C_LABEL(sintrcnt)
-
-_C_LABEL(intrcnt):
- .space ICU_LEN*4 /* XXX Should be linked to number of interrupts */
-
-_C_LABEL(sintrcnt):
- .word ICU_LEN*4
OpenPOWER on IntegriCloud