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/slic.h

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  * HISTORY
   31  * $Log:        slic.h,v $
   32  * Revision 2.3  91/07/31  18:03:55  dbg
   33  *      Changed copyright.
   34  *      [91/07/31            dbg]
   35  * 
   36  * Revision 2.2  91/05/08  12:59:37  dbg
   37  *      Added volatile declarations.
   38  *      [90/11/13            dbg]
   39  * 
   40  *      Adapted for pure Mach kernel.  I386 SGS processors only.
   41  *      [90/10/02            dbg]
   42  * 
   43  */
   44 
   45 /*
   46  * $Header: slic.h,v 2.3 91/07/31 18:03:55 dbg Exp $
   47  *
   48  * This defines the offsets for the slic addresses and the base
   49  * address for accessing it.
   50  */
   51 
   52 /*
   53  * Revision 1.1  89/07/19  14:48:55  kak
   54  * Initial revision
   55  * 
   56  * Revision 2.7  88/10/10  15:07:12  rto
   57  * Added 532-specific definitions in support of a common inter-project
   58  * build environment.
   59  * 
   60  * Revision 2.8  88/08/02  12:04:25  rto
   61  * 532port:  Added conditional definitions for LOAD_CPUSLICADDR.
   62  * 
   63  * Revision 2.7  88/07/28  10:05:47  rto
   64  * 532port:  LOAD__CPUSLICADDR is now set to PHYS_SLIC to support
   65  * 1-1 mapping of SLIC addresses for the 532.
   66  * 
   67  */
   68 
   69 #ifndef _SQT_SLIC_H_
   70 #define _SQT_SLIC_H_
   71 
   72 #include <sys/types.h>
   73 
   74 #ifndef __CHIPTYPES__
   75 #include <sqt/chiptypes.h>
   76 #endif
   77 
   78 #include <sqt/vm_defs.h>
   79 
   80 #ifdef  i386
   81 #define LOAD_CPUSLICADDR        PHYS_SLIC       /* i386 uses virt==phys */
   82 #endif  i386
   83 
   84 #if defined(ns32000) && (CPU_TYPE == 32532)
   85 #define LOAD_CPUSLICADDR        PHYS_SLIC       /* 532 uses virt==phys */
   86 #endif ns32000
   87 
   88 #if defined(ns32000) && (CPU_TYPE != 32532)
   89 #define LOAD_CPUSLICADDR        0x0FF0000       /* 032 boot/loader uses this */
   90 #endif  ns32000
   91 
   92 struct  cpuslic {
   93   volatile u_char   sl_cmd_stat,d0[3];  /* RW W: command, R: status */
   94            u_char   sl_dest,    d1[3];  /* W */
   95            u_char   sl_smessage,d2[3];  /* W   send message data */
   96   volatile u_char   sl_b0int,   d3[3];  /* R   bin 0 interrupt */
   97   volatile u_char   sl_binint,  d4[3];  /* RW  bin 1-7 interrupt */
   98   volatile u_char   sl_nmiint,  d5[3];  /* R   NMI interrupt */
   99   volatile u_char   sl_lmask,   d6[3];  /* RW  local interrupt mask */
  100   volatile u_char   sl_gmask,   d7[3];  /* R   group interrupt mask */
  101   volatile u_char   sl_ipl,     d8[3];  /* RW  interrupt priority level */
  102   volatile u_char   sl_ictl,    d9[3];  /* RW  interrupt control */
  103   volatile u_char   sl_tcont,   d10[3]; /* RW  timer contents */
  104   volatile u_char   sl_trv,     d11[3]; /* RW  timer reload value */
  105            u_char   sl_tctl,    d12[3]; /* W   timer control */
  106   volatile u_char   sl_sdr,     d13[3]; /* R   slave data register */
  107   volatile u_char   sl_procgrp, d14[3]; /* RW  processor group */
  108   volatile u_char   sl_procid,  d15[3]; /* RW  processor id */
  109   volatile u_char   sl_crl,     d16[3]; /* R   chip revision level */
  110 };
  111 
  112 #define NUMGATES        64              /* number of slic gates */
  113 
  114 /*
  115  * MAX_NUM_SLIC is the maximum number of different slic addresses possible.
  116  * Slic addresses are 0 thru MAX_NUM_SLIC-1.
  117  */
  118 
  119 #define MAX_NUM_SLIC    64
  120 
  121 /* Commands: */
  122 #define SL_MINTR        0x10    /* transmit maskable interrupt */
  123 #define SL_INTRACK      0x20    /* interrupt acknowledge */
  124 #define SL_SETGM        0x30    /* set group interrupt mask */
  125 #define SL_REQG         0x40    /* request Gate */
  126 #define SL_RELG         0x50    /* release Gate */
  127 #define SL_NMINTR       0x60    /* transmit non-maskable interrupt */
  128 #define SL_RDDATA       0x70    /* read slave data */
  129 #define SL_WRDATA       0x80    /* write slave data */
  130 #define SL_WRADDR       0x90    /* write slave I/O address */
  131 
  132 /* Returned command status: */
  133 #define SL_BUSY         0x80    /* SLIC busy */
  134 #define SL_GATEFREE     0x10    /* Gate[send_message_data] free */
  135 #define SL_WRBE         0x08    /* Processor write buffer empty */
  136 #define SL_PARITY       0x04    /* parity error during SLIC message */
  137 #define SL_EXISTS       0x02    /* destination SLIC's exist */
  138 #define SL_OK           0x01    /* command completed ok */
  139 
  140 /* Destination id's */
  141 #define SL_GROUP        0x40
  142 #define SL_ALL          0x3F
  143 
  144 /* Interrupt control */
  145 #define SL_HARDINT      0x80    /* hardware interrupts accepted */
  146 #define SL_SOFTINT      0x40    /* software interrupts accepted */
  147 #define SL_MODEACK      0x01    /* interrupt acknowledge mode */
  148 
  149 #define SL_GM_ALLON     0xFF    /* Group Mask all enabled */
  150 
  151 /* Timer interrupts */
  152 #define SL_TIMERINT     0x80    /* enable timer interrupts */
  153 #define SL_TIM5MHZ      0x08    /* decrement timer at 5 MHz */
  154 #define SL_TIMERBIN     0x07    /* interrupt bin mask of timer */
  155 #define SL_TIMERFREQ    10000   /* counts per second */
  156 #define SL_TIMERDIV     1000    /* system clock divisor for one clock count */
  157 
  158 /* Processor ID */
  159 #define SL_TESTM        0x80    /* enable test mode */
  160 #define SL_PROCID       0x3F    /* processor ID mask */
  161 
  162 /* Chip version stuff */
  163 #define SL_VENDOR       0xE0    /* vendor number */
  164 #define SL_RELEASE      0x1C    /* release number */
  165 #define SL_STEPPING     0x03    /* step number */
  166 
  167 /*
  168  * "va_slic" is virtual-pointer to structured SLIC.
  169  */
  170 #define va_slic ((struct cpuslic *)VA_SLIC)
  171 
  172 /* 
  173  * SLICPRI() macro programs current execution priority into SLIC for
  174  * interrupt arbitration.  Argument is runQ # (eg, 0-31); thus, we
  175  * shift by 3 bits to get this into the writable portion of the register.
  176  */
  177 
  178 #define SLICPRI(p)      va_slic->sl_ipl = (p) << 3
  179 
  180 #endif  /* _SQT_SLIC_H_ */

Cache object: b42355099f29bf4ad0853c2ca6771e51


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