1/* $NetBSD: vectors.S,v 1.3 2002/04/03 23:33:28 thorpej Exp $ */ 2 3/* 4 * Copyright (C) 1994-1997 Mark Brinicombe 5 * Copyright (C) 1994 Brini 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. 16 * 3. All advertising materials mentioning features or use of this software 17 * must display the following acknowledgement: 18 * This product includes software developed by Brini. 19 * 4. The name of Brini may not be used to endorse or promote products 20 * derived from this software without specific prior written permission. 21 * 22 * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR 23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25 * IN NO EVENT SHALL BRINI BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 28 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 29 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 30 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 31 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34#include "assym.h" 35#include <machine/asm.h> 36 37/* 38 * These are the exception vectors copied down to page 0. 39 * 40 * Note that FIQs are special; rather than using a level of 41 * indirection, we actually copy the FIQ code down into the 42 * vector page. 43 */ 44 45 .text 46 .align 0 47 .global _C_LABEL(page0), _C_LABEL(page0_data), _C_LABEL(page0_end) 48 .global _C_LABEL(fiqvector) 49 50_C_LABEL(page0): 51 ldr pc, Lreset_target 52 ldr pc, Lundefined_target 53 ldr pc, Lswi_target 54 ldr pc, Lprefetch_abort_target 55 ldr pc, Ldata_abort_target 56 ldr pc, Laddress_exception_target 57 ldr pc, Lirq_target 58#ifdef __ARM_FIQ_INDIRECT 59 ldr pc, Lfiq_target 60#else 61Lfiqvector: 62 .set _C_LABEL(fiqvector), . - _C_LABEL(page0) 63 subs pc, lr, #4 64 .org Lfiqvector + 0x100 65#endif 66 67_C_LABEL(page0_data): 68Lreset_target: 69 .word reset_entry 70 71Lundefined_target: 72 .word undefined_entry 73 74Lswi_target: 75 .word swi_entry 76 77Lprefetch_abort_target: 78 .word prefetch_abort_entry 79 80Ldata_abort_target: 81 .word data_abort_entry 82 83Laddress_exception_target: 84 .word address_exception_entry 85 86Lirq_target: 87 .word irq_entry 88 89#ifdef __ARM_FIQ_INDIRECT 90Lfiq_target: 91 .word _C_LABEL(fiqvector) 92#else 93 .word 0 /* pad it out */ 94#endif 95_C_LABEL(page0_end): 96 97#ifdef __ARM_FIQ_INDIRECT 98 .data 99 .align 0 100_C_LABEL(fiqvector): 101 subs pc, lr, #4 102 .org _C_LABEL(fiqvector) + 0x100 103#endif 104