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/sqtsec/co.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:        co.h,v $
   32  * Revision 2.4  93/03/10  11:30:35  danner
   33  *      u_long -> u_int
   34  *      [93/03/10            danner]
   35  * 
   36  * Revision 2.3  91/07/31  18:06:27  dbg
   37  *      Changed copyright.
   38  *      [91/07/31            dbg]
   39  * 
   40  * Revision 2.2  91/05/08  13:05:01  dbg
   41  *      Added volatile declarations.
   42  *      [91/03/25            dbg]
   43  * 
   44  *      Added output buffer since Mach kernel circular buffers are not
   45  *      within SCED-addressable space (lowest 4 Meg).
   46  *      [90/12/18            dbg]
   47  * 
   48  *      Adapted for pure kernel.
   49  *      [90/09/24            dbg]
   50  * 
   51  */
   52 
   53 /*
   54  * $Header: co.h,v 2.4 93/03/10 11:30:35 danner Exp $
   55  */
   56 
   57 /*
   58  * co.h
   59  *      Info passed between the SCSI/Ether console driver and the
   60  *      binary config file.
   61  *
   62  * binary config table for the console driver.  There is one entry in
   63  * the co_bin_config[] table for each controller in the system.
   64  */
   65 
   66 /*
   67  * Revision 1.1  89/07/05  13:20:12  kak
   68  * Initial revision
   69  * 
   70  */
   71 #ifndef _SQTSEC_CO_H_
   72 #define _SQTSEC_CO_H_
   73 
   74 #include <sys/types.h>
   75 #include <device/tty.h>
   76 
   77 #include <sqt/mutex.h>
   78 #include <sqtsec/sec.h>
   79 
   80 struct co_bin_config {
   81         gate_t  cobc_gate;
   82 };
   83 
   84 /*
   85  * Console state.
   86  * There is one such structure for each tty device (minor device) on
   87  * each SCSI/Ether controller.
   88  *
   89  * The local and remote console devices are always minor devices 0
   90  * and 1, regardless of where they appear on the bus.  This is
   91  * guaranteed at config time.
   92  * 
   93  * Mutex notes:
   94  *      We could lock the input and output sides separately.  
   95  *      But, this would probably not be a big win.  So, use one
   96  *      lock for all state information.
   97  */
   98 
   99 /*
  100  * throw together a structure containing the size of the program queue
  101  * and its state.
  102  */
  103 
  104 struct sec_pq {
  105         struct sec_progq        *sq_progq;
  106         u_short                 sq_size;
  107 };
  108 
  109 #define CBSIZE  64                              /* size of input buffer */
  110 
  111 struct co_state {
  112         struct  tty     ss_tty;
  113         u_char  ss_alive;
  114         u_char  ss_initted;
  115                                                 /* input state */
  116         volatile
  117           int   is_status;
  118         struct  sec_dev *is_sd;
  119         struct  sec_pq  is_reqq;
  120         struct  sec_pq  is_doneq;
  121         u_int   is_ovc;                 /* count number of overflow errors */
  122         u_int   is_parc;                /* count number of parity errors */
  123         char    is_buffer[CBSIZE];
  124         u_char  is_restart_read;        /* restart read flag             */
  125         u_char  is_initted;
  126                                                 /* output state */
  127         volatile
  128           int   os_status;
  129         struct  sec_dev *os_sd;
  130         struct  sec_pq  os_reqq;
  131         struct  sec_pq  os_doneq;
  132         struct  sec_smode       os_smode;
  133         sema_t  os_busy_wait;
  134         u_char  os_busy_flag;
  135         u_char  os_initted;
  136 #ifdef  MACH_KERNEL
  137         char    os_buffer[CBSIZE];
  138 #endif  /* MACH_KERNEL */
  139 
  140 };
  141 
  142 #define CM_BAUD         sm_un.sm_cons.cm_baud
  143 #define CM_FLAGS        sm_un.sm_cons.cm_flags
  144 
  145 #ifdef  KERNEL
  146 extern struct   co_bin_config co_bin_config[];
  147 extern int      co_bin_config_count;
  148 #ifdef  DEBUG
  149 extern int      co_debug;
  150 #endif  DEBUG
  151 #endif  KERNEL
  152 
  153 #ifdef DEBUG
  154 extern char gc_last;
  155 #define DBGCHAR ('f'&037)
  156 #endif  DEBUG
  157 
  158 #endif  /* _SQTSEC_CO_H_ */

Cache object: 9efea50c5dc589573302cac17dfd879c


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