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/include/smptests.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  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  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Copyright (c) 1996, by Steve Passe
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  * 1. Redistributions of source code must retain the above copyright
    9  *    notice, this list of conditions and the following disclaimer.
   10  * 2. The name of the developer may NOT be used to endorse or promote products
   11  *    derived from this software without specific prior written permission.
   12  *
   13  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   14  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   16  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   17  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   18  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   19  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   20  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   21  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   22  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   23  * SUCH DAMAGE.
   24  *
   25  * $FreeBSD: releng/5.0/sys/i386/include/smptests.h 99582 2002-07-08 09:14:01Z peter $
   26  */
   27 
   28 #ifndef _MACHINE_SMPTESTS_H_
   29 #define _MACHINE_SMPTESTS_H_
   30 
   31 
   32 /*
   33  * Various 'tests in progress' and configuration parameters.
   34  */
   35 
   36 
   37 /*
   38  * Control the "giant lock" pushdown by logical steps.
   39  */
   40 #define PUSHDOWN_LEVEL_1
   41 #define PUSHDOWN_LEVEL_2
   42 
   43 /*
   44  * Put FAST_INTR() ISRs at an APIC priority above the regular INTs.
   45  * Allow the mp_lock() routines to handle FAST interrupts while spinning.
   46  */
   47 #ifdef PUSHDOWN_LEVEL_1
   48 #define FAST_HI
   49 #endif
   50 
   51 
   52 /*
   53  * These defines enable critical region locking of areas that were
   54  * protected via cli/sti in the UP kernel.
   55  *
   56  * COMLOCK protects the sio/cy drivers.
   57  * known to be incomplete:
   58  *      joystick lkm
   59  *      ?
   60  */
   61 #ifdef PUSHDOWN_LEVEL_1
   62 #define USE_COMLOCK
   63 #endif
   64 
   65 
   66 /*
   67  * Portions of the old TEST_LOPRIO code, back from the grave!
   68  */
   69 #define GRAB_LOPRIO
   70 
   71 
   72 /*
   73  * Send CPUSTOP IPI for stop/restart of other CPUs on DDB break.
   74 #define VERBOSE_CPUSTOP_ON_DDBBREAK
   75  */
   76 #define CPUSTOP_ON_DDBBREAK
   77 
   78 
   79 /*
   80  * Bracket code/comments relevant to the current 'giant lock' model.
   81  * Everything is now the 'giant lock' model, but we will use this as
   82  * we start to "push down" the lock.
   83  */
   84 #define GIANT_LOCK
   85 
   86 #ifdef APIC_IO
   87 /*
   88  * Don't assume that slow interrupt handler X is called from vector
   89  * X + ICU_OFFSET.
   90  */
   91 #define APIC_INTR_REORDER
   92 
   93 #endif /* APIC_IO */
   94 
   95 /*
   96  * Misc. counters.
   97  *
   98 #define COUNT_XINVLTLB_HITS
   99  */
  100 
  101 
  102 /**
  103  * Hack to "fake-out" kernel into thinking it is running on a 'default config'.
  104  *
  105  * value == default type
  106 #define TEST_DEFAULT_CONFIG     6
  107  */
  108 
  109 
  110 /*
  111  * Simple test code for IPI interaction, save for future...
  112  *
  113 #define TEST_TEST1
  114 #define IPI_TARGET_TEST1        1
  115  */
  116 
  117 
  118 /*
  119  * Address of POST hardware port.
  120  * Defining this enables POSTCODE macros.
  121  *
  122 #define POST_ADDR               0x80
  123  */
  124 
  125 
  126 /*
  127  * POST hardware macros.
  128  */
  129 #ifdef POST_ADDR
  130 #define ASMPOSTCODE_INC                         \
  131         pushl   %eax ;                          \
  132         movl    _current_postcode, %eax ;       \
  133         incl    %eax ;                          \
  134         andl    $0xff, %eax ;                   \
  135         movl    %eax, _current_postcode ;       \
  136         outb    %al, $POST_ADDR ;               \
  137         popl    %eax
  138 
  139 /*
  140  * Overwrite the current_postcode value.
  141  */
  142 #define ASMPOSTCODE(X)                          \
  143         pushl   %eax ;                          \
  144         movl    $X, %eax ;                      \
  145         movl    %eax, _current_postcode ;       \
  146         outb    %al, $POST_ADDR ;               \
  147         popl    %eax
  148 
  149 /*
  150  * Overwrite the current_postcode low nibble.
  151  */
  152 #define ASMPOSTCODE_LO(X)                       \
  153         pushl   %eax ;                          \
  154         movl    _current_postcode, %eax ;       \
  155         andl    $0xf0, %eax ;                   \
  156         orl     $X, %eax ;                      \
  157         movl    %eax, _current_postcode ;       \
  158         outb    %al, $POST_ADDR ;               \
  159         popl    %eax
  160 
  161 /*
  162  * Overwrite the current_postcode high nibble.
  163  */
  164 #define ASMPOSTCODE_HI(X)                       \
  165         pushl   %eax ;                          \
  166         movl    _current_postcode, %eax ;       \
  167         andl    $0x0f, %eax ;                   \
  168         orl     $(X<<4), %eax ;                 \
  169         movl    %eax, _current_postcode ;       \
  170         outb    %al, $POST_ADDR ;               \
  171         popl    %eax
  172 #else
  173 #define ASMPOSTCODE_INC
  174 #define ASMPOSTCODE(X)
  175 #define ASMPOSTCODE_LO(X)
  176 #define ASMPOSTCODE_HI(X)
  177 #endif /* POST_ADDR */
  178 
  179 
  180 #endif /* _MACHINE_SMPTESTS_H_ */

Cache object: ecf55a85505b6dd7b86c2b76a9bad2ae


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