The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


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

FreeBSD/Linux Kernel Cross Reference
sys/i386/isa/atpic_vector.s

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 1989, 1990 William F. Jolitz.
    3  * Copyright (c) 1990 The Regents of the University of California.
    4  * All rights reserved.
    5  *
    6  * Redistribution and use in source and binary forms, with or without
    7  * modification, are permitted provided that the following conditions
    8  * are met:
    9  * 1. Redistributions of source code must retain the above copyright
   10  *    notice, this list of conditions and the following disclaimer.
   11  * 2. Redistributions in binary form must reproduce the above copyright
   12  *    notice, this list of conditions and the following disclaimer in the
   13  *    documentation and/or other materials provided with the distribution.
   14  * 3. All advertising materials mentioning features or use of this software
   15  *    must display the following acknowledgement:
   16  *      This product includes software developed by the University of
   17  *      California, Berkeley and its contributors.
   18  * 4. Neither the name of the University nor the names of its contributors
   19  *    may be used to endorse or promote products derived from this software
   20  *    without specific prior written permission.
   21  *
   22  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   25  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   32  * SUCH DAMAGE.
   33  *
   34  *      from: vector.s, 386BSD 0.1 unknown origin
   35  * $FreeBSD: releng/5.2/sys/i386/isa/atpic_vector.s 122693 2003-11-14 20:06:24Z peter $
   36  */
   37 
   38 /*
   39  * Interrupt entry points for external interrupts triggered by the 8259A
   40  * master and slave interrupt controllers.
   41  */
   42 
   43 #include <machine/asmacros.h>
   44 #include <i386/isa/icu.h>
   45 #ifdef PC98
   46 #include <pc98/pc98/pc98.h>
   47 #else
   48 #include <i386/isa/isa.h>
   49 #endif
   50 
   51 #include "assym.s"
   52 
   53 /*
   54  * Macros for interrupt interrupt entry, call to handler, and exit.
   55  */
   56 #define INTR(irq_num, vec_name) \
   57         .text ;                                                         \
   58         SUPERALIGN_TEXT ;                                               \
   59 IDTVEC(vec_name) ;                                                      \
   60         pushl   $0 ;            /* dummy error code */                  \
   61         pushl   $0 ;            /* dummy trap type */                   \
   62         pushal ;                /* 8 ints */                            \
   63         pushl   %ds ;           /* save data and extra segments ... */  \
   64         pushl   %es ;                                                   \
   65         pushl   %fs ;                                                   \
   66         mov     $KDSEL,%ax ;    /* load kernel ds, es and fs */         \
   67         mov     %ax,%ds ;                                               \
   68         mov     %ax,%es ;                                               \
   69         mov     $KPSEL,%ax ;                                            \
   70         mov     %ax,%fs ;                                               \
   71 ;                                                                       \
   72         FAKE_MCOUNT(13*4(%esp)) ;       /* XXX late to avoid double count */ \
   73         pushl   $irq_num;       /* pass the IRQ */                      \
   74         call    atpic_handle_intr ;                                     \
   75         addl    $4, %esp ;      /* discard the parameter */             \
   76 ;                                                                       \
   77         MEXITCOUNT ;                                                    \
   78         jmp     doreti
   79 
   80 MCOUNT_LABEL(bintr)
   81         INTR(0, atpic_intr0)
   82         INTR(1, atpic_intr1)
   83         INTR(2, atpic_intr2)
   84         INTR(3, atpic_intr3)
   85         INTR(4, atpic_intr4)
   86         INTR(5, atpic_intr5)
   87         INTR(6, atpic_intr6)
   88         INTR(7, atpic_intr7)
   89         INTR(8, atpic_intr8)
   90         INTR(9, atpic_intr9)
   91         INTR(10, atpic_intr10)
   92         INTR(11, atpic_intr11)
   93         INTR(12, atpic_intr12)
   94         INTR(13, atpic_intr13)
   95         INTR(14, atpic_intr14)
   96         INTR(15, atpic_intr15)
   97 MCOUNT_LABEL(eintr)

Cache object: 1b5f4c61bba835e8ebc024b48ea6e338


[ 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.