[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/arm/arm/fiq_subr.S

Version: -  FREEBSD  -  FREEBSD7  -  FREEBSD71  -  FREEBSD70  -  FREEBSD6  -  FREEBSD64  -  FREEBSD63  -  FREEBSD62  -  FREEBSD61  -  FREEBSD60  -  FREEBSD5  -  FREEBSD55  -  FREEBSD54  -  FREEBSD53  -  FREEBSD52  -  FREEBSD51  -  FREEBSD50  -  FREEBSD4  -  FREEBSD3  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  OPENSOLARIS  -  minix-3-1-1  -  TRUSTEDBSD-SEBSD  -  FREEBSD-LIBC  -  FREEBSD7-LIBC  -  FREEBSD6-LIBC  -  GLIBC27 
SearchContext: -  none  -  excerpts  -  bigexcerpts 

  1 /*      $NetBSD: fiq_subr.S,v 1.3 2002/04/12 18:50:31 thorpej Exp $     */
  2 
  3 /*-
  4  * Copyright (c) 2001 Wasabi Systems, Inc.
  5  * All rights reserved.
  6  *
  7  * Written by Jason R. Thorpe for Wasabi Systems, Inc.
  8  *
  9  * Redistribution and use in source and binary forms, with or without
 10  * modification, are permitted provided that the following conditions
 11  * are met:
 12  * 1. Redistributions of source code must retain the above copyright
 13  *    notice, this list of conditions and the following disclaimer.
 14  * 2. Redistributions in binary form must reproduce the above copyright
 15  *    notice, this list of conditions and the following disclaimer in the
 16  *    documentation and/or other materials provided with the distribution.
 17  * 3. All advertising materials mentioning features or use of this software
 18  *    must display the following acknowledgement:
 19  *      This product includes software developed for the NetBSD Project by
 20  *      Wasabi Systems, Inc.
 21  * 4. The name of Wasabi Systems, Inc. may not be used to endorse
 22  *    or promote products derived from this software without specific prior
 23  *    written permission.
 24  *
 25  * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
 26  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 27  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 28  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
 29  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 30  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 31  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 32  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 33  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 34  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 35  * POSSIBILITY OF SUCH DAMAGE.
 36  *
 37  */
 38 
 39 
 40 #include <machine/armreg.h>
 41 #include <machine/asm.h>
 42 __FBSDID("$FreeBSD: src/sys/arm/arm/fiq_subr.S,v 1.3 2005/01/05 21:58:47 imp Exp $");
 43 
 44 /*
 45  * MODE_CHANGE_NOP should be inserted between a mode change and a
 46  * banked register (R8--R15) access.
 47  */
 48 #if defined(CPU_ARM2) || defined(CPU_ARM250)
 49 #define MODE_CHANGE_NOP mov     r0, r0
 50 #else
 51 #define MODE_CHANGE_NOP /* Data sheet says ARM3 doesn't need it */
 52 #endif
 53 
 54 #define SWITCH_TO_FIQ_MODE                                              \
 55         mrs     r2, cpsr_all                                    ;       \
 56         mov     r3, r2                                          ;       \
 57         bic     r2, r2, #(PSR_MODE)                             ;       \
 58         orr     r2, r2, #(PSR_FIQ32_MODE)                       ;       \
 59         msr     cpsr_all, r2
 60 
 61 #define BACK_TO_SVC_MODE                                                \
 62         msr     cpsr_all, r3
 63 
 64 /*
 65  * fiq_getregs:
 66  *
 67  *      Fetch the FIQ mode banked registers into the fiqhandler
 68  *      structure.
 69  */
 70 ENTRY(fiq_getregs)
 71         SWITCH_TO_FIQ_MODE
 72 
 73         stmia   r0, {r8-r13}
 74 
 75         BACK_TO_SVC_MODE
 76         RET
 77 
 78 /*
 79  * fiq_setregs:
 80  *
 81  *      Load the FIQ mode banked registers from the fiqhandler
 82  *      structure.
 83  */
 84 ENTRY(fiq_setregs)
 85         SWITCH_TO_FIQ_MODE
 86 
 87         ldmia   r0, {r8-r13}
 88 
 89         BACK_TO_SVC_MODE
 90         RET
 91 
 92 /*
 93  * fiq_nullhandler:
 94  *
 95  *      Null handler copied down to the FIQ vector when the last
 96  *      FIQ handler is removed.
 97  */
 98         .global _C_LABEL(fiq_nullhandler), _C_LABEL(fiq_nullhandler_end)
 99 _C_LABEL(fiq_nullhandler):
100         subs    pc, lr, #4
101 _C_LABEL(fiq_nullhandler_end):

Cache object: cf3d5bf3ae5f7b2b40e839f37f62dca8


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.