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/sqt/spl.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  * Mach Operating System
    3  * Copyright (c) 1991 Carnegie Mellon University
    4  * Copyright (c) 1991 Sequent Computer Systems
    5  * All Rights Reserved.
    6  * 
    7  * Permission to use, copy, modify and distribute this software and its
    8  * documentation is hereby granted, provided that both the copyright
    9  * notice and this permission notice appear in all copies of the
   10  * software, derivative works or modified versions, and any portions
   11  * thereof, and that both notices appear in supporting documentation.
   12  * 
   13  * CARNEGIE MELLON AND SEQUENT COMPUTER SYSTEMS ALLOW FREE USE OF
   14  * THIS SOFTWARE IN ITS "AS IS" CONDITION.  CARNEGIE MELLON AND
   15  * SEQUENT COMPUTER SYSTEMS DISCLAIM ANY LIABILITY OF ANY KIND FOR
   16  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   17  * 
   18  * Carnegie Mellon requests users of this software to return to
   19  * 
   20  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   21  *  School of Computer Science
   22  *  Carnegie Mellon University
   23  *  Pittsburgh PA 15213-3890
   24  * 
   25  * any improvements or extensions that they make and grant Carnegie Mellon 
   26  * the rights to redistribute these changes.
   27  */
   28 
   29 /* 
   30  * Mach Operating System
   31  * Copyright (c) 1991 Carnegie-Mellon University
   32  * Copyright (c) 1990 Carnegie-Mellon University
   33  * All rights reserved.  The CMU software License Agreement specifies
   34  * the terms and conditions for use and redistribution.
   35  */
   36 /*
   37  * HISTORY
   38  * $Log:        spl.s,v $
   39  * Revision 2.3  91/07/31  18:04:15  dbg
   40  *      Changed copyright.
   41  *      [91/07/31            dbg]
   42  * 
   43  * Revision 2.2  91/05/08  13:00:10  dbg
   44  *      Fix SPL levels to match reality.
   45  *      [91/02/14            dbg]
   46  * 
   47  *      Put parentheses around substituted immediate expressions, so
   48  *      that they will pass through the GNU preprocessor.
   49  *      [91/01/31            dbg]
   50  * 
   51  *      Adapted for pure Mach kernel.
   52  *      [90/10/02            dbg]
   53  * 
   54  */
   55 
   56 /*
   57  * spl.s
   58  *
   59  * Implement spl's.  Should be inline asm via intctl.h
   60  * Used as a backup
   61  */
   62 
   63 #include <assym.s>
   64 #include <i386/asm.h>
   65 #include <sqt/asm_macros.h>
   66 #include <sqt/intctl.h>
   67 
   68 ENTRY(spl0)
   69         SPL_ASM($(SPL0), %al)
   70         movzbl  %al, %eax
   71         ret
   72 
   73 ENTRY(spl1)
   74 ENTRY(splsoftclock)
   75 ENTRY(splvm)
   76         SPL_ASM($(SPL1), %al)
   77         movzbl  %al, %eax
   78         ret
   79 
   80 ENTRY(spl2)
   81         SPL_ASM($(SPL2), %al)
   82         movzbl  %al, %eax
   83         ret
   84 
   85 ENTRY(spl3)
   86         SPL_ASM($(SPL3), %al)
   87         movzbl  %al, %eax
   88         ret
   89 
   90 ENTRY(spl4)
   91 ENTRY(spltty)
   92         SPL_ASM($(SPL4), %al)
   93         movzbl  %al, %eax
   94         ret
   95 
   96 ENTRY(spl5)
   97         SPL_ASM($(SPL5), %al)
   98         movzbl  %al, %eax
   99         ret
  100 
  101 ENTRY(spl6)
  102 ENTRY(splbio)
  103         SPL_ASM($(SPL6), %al)
  104         movzbl  %al, %eax
  105         ret
  106 
  107 ENTRY(spl7)
  108 ENTRY(splsched)
  109 ENTRY(splclock)
  110         SPL_ASM($(SPL7), %al)
  111         movzbl  %al, %eax
  112         ret
  113 
  114 ENTRY(splnet)
  115         SPL_ASM($(SPLNET), %al)
  116         movzbl  %al, %eax
  117         ret
  118 
  119 ENTRY(splimp)
  120         SPL_ASM($(SPLIMP), %al)
  121         movzbl  %al, %eax
  122         ret
  123 
  124 ENTRY(splhi)
  125 ENTRY(splhigh)
  126         SPL_ASM($(SPLHI), %al)
  127         movzbl  %al, %eax
  128         ret
  129 
  130 /*
  131  * splx(newmask)
  132  *      Lower interrupt priority mask back to previous value.
  133  *
  134  * DEBUG version checks that mask is actually "lowering" -- ie, staying the
  135  * same or enabling more interrupts.  Non-debug version is in-line expanded
  136  * (see machine/intctl.h).
  137  *
  138  * Since 1's in the mask enable interrupts, (oldmask & newmask) == oldmask is ok.
  139  */
  140 
  141 #ifdef  DEBUG
  142 ENTRY(splx)
  143         movb    VA_SLIC+SL_LMASK, %ah           # old mask value from SLIC.
  144         movb    S_ARG0, %al                     # new mask.
  145         movb    %al, VA_SLIC+SL_LMASK           # install new mask.
  146         andb    %ah, %al                        # %al = old & new.
  147         cmpb    %ah, %al                        # ok if (old & new) == old.
  148         jne     9f                              # not ok -- down in flames.
  149         ret                                     # ok -- done.
  150 9:      pushl   $8f                             # bad news.
  151         call    _panic                          # really bad news.
  152 8:      .asciz  "splx: bad nesting"
  153 
  154 #else DEBUG
  155 ENTRY(splx)
  156         movb    S_ARG0, %cl
  157         SPL_ASM(%cl, %al)
  158         ret
  159 #endif  DEBUG

Cache object: 1af2de754b90f1faafd23d299a3bec2c


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