Annotation of coherent/f/usr/man/KERNEL/com, revision 1.1

1.1     ! root        1: ccoomm -- Device Driver
        !             2: 
        !             3: 
        !             4: The  COHERENT 286  system  supports four  asynchronous  serial lines,  ccoomm11
        !             5: through ccoomm44, via device drivers aall00  and aall11. The COHERENT 386 system uses
        !             6: device driver aassyy  to control up to 32 serial  lines.  See their respective
        !             7: Lexicon entries  for further details.   Note that the rest  of this article
        !             8: applies to COHERENT 286.
        !             9: 
        !            10: A serial  line can  be opened  into any of  four different  ``flavors'', as
        !            11: follows:
        !            12: 
        !            13: ccoomm?ll     Interrupt driven, local mode (no modem control)
        !            14: ccoomm?rr     Interrupt driven, remote mode (modem control)
        !            15: ccoomm?ppll    Polled, local mode (no modem control)
        !            16: ccoomm?pprr    Polled, remote mode (modem control)
        !            17: 
        !            18: ``Local mode'' means that the line will have a terminal plugged into it, to
        !            19: directly access  the computer.  ``Modem control'' means  that the line will
        !            20: have a modem plugged into it.  Modem control is enabled on a serial line by
        !            21: resetting the modem control bit (bit 7) in the minor number for the device.
        !            22: This allows the system to generate a hangup signal when the modem indicates
        !            23: loss of carrier by dropping DCD (Data Carrier Detect).  A modem line should
        !            24: always have its DSR, DCD and CTS pins connected.  If left hanging, spurious
        !            25: transitions can cause severe system thrashing.  To disable modem control on
        !            26: a given serial  line, use the minor device which  has the modem control bit
        !            27: set (bit 7).  An ooppeenn to a modem-control line will block until a carrier is
        !            28: detected (DCD goes true).
        !            29: 
        !            30: ``Interrupt mode'' means that the port can generate an interrupt to attract
        !            31: the attention  of the COHERENT system; ``polled mode''  means that the port
        !            32: cannot  generate  an   interrupt,  but  must  be  checked  (or  ``polled'')
        !            33: constantly by the COHERENT system to see if activity has occurred on it.
        !            34: 
        !            35: The COHERENT 286 system uses two device drivers to manage serial lines: aall00
        !            36: manages COM1 and  COM3, and aall11 manages COM2 and  COM4.  Due to limitations
        !            37: in the  design of the  ports, you can  enable interrupts on  either COM1 or
        !            38: COM3 (or  on COM2 or  COM4), but not both.   If you wish to  use both ports
        !            39: simultaneously, one must  be run in polled mode.  For  example, if you wish
        !            40: to open all  four serial lines, you can open  two of the lines in interrupt
        !            41: mode: you can open either COM1  or COM3 in interrupt mode, and you can open
        !            42: either COM2 or COM4 in interrupt  mode.  The other two lines must be opened
        !            43: in polled mode.
        !            44: 
        !            45: Opening a  device in polled mode  consumes many CPU cycles,  based upon the
        !            46: speed of the highest baud rate  requested.  For example, on a 20 MHz 80386-
        !            47: based machine, polling  at 9600-baud was found to consume  about 15% of the
        !            48: CPU time.  As only one device can use the interrupt line at any given time,
        !            49: the best  approach is  to make  the high-speed line  of the  pair interrupt
        !            50: driven and open the low-speed  or less-frequently used line in polled mode.
        !            51: However, if you enable a polled  line for logins, the port is open and will
        !            52: be polled as long as the port remains open (enabled).  Thus, even if a port
        !            53: is not in use, the fact  that it has a ggeettttyy on it consumes CPU cycles.  As
        !            54: a rule of thumb, try and open a port in interrupt mode.  If you cannot, use
        !            55: the polled version.  Also note that  use of any of the four serial ports in
        !            56: polled mode  prevents other  polled serial device  drivers, such as  the hhss
        !            57: generic multi-port polled serial driver, from being used at the same time.
        !            58: 
        !            59: If you intend to use a  modem on your serial port, you must insure that the
        !            60: DCD signal  from the  modem actually _f_o_l_l_o_w_s  the state of  carrier detect.
        !            61: Some modems allow the user to ``strap'' or set the DCD signal so that it is
        !            62: always asserted (true).  This  incorrect setup will cause COHERENT to think
        !            63: that the  modem is ``connected'' to  a remote modem, even  when there is no
        !            64: such connection.
        !            65: 
        !            66: In addition, if you wish to allow remote logins to your COHERENT system via
        !            67: your modem,  you must insure that  the modem does _n_o_t  echo any commands or
        !            68: status  information.   Failure  to  do  so  will result  in  severe  system
        !            69: thrashing due to the ggeettttyy or llooggiinn processes endlessly ``talking'' to your
        !            70: modem.
        !            71: 
        !            72: _C_h_a_n_g_i_n_g _D_e_f_a_u_l_t _P_o_r_t _S_p_e_e_d_s
        !            73: Serial  lines ccoomm11  through ccoomm44  default to 9600  baud when  opened.  This
        !            74: default  speed  can be  permanently  changed  on a  ``per  port'' basis  by
        !            75: changing the  value of driver  variables CC11BBAAUUDD, CC22BBAAUUDD,  CC33BBAAUUDD or CC44BBAAUUDD.
        !            76: The list  of acceptible values  can be found  in header file  <ssggttttyy.hh> and
        !            77: range from  1, corresponding  to 50  baud, up to  17, which  corresponds to
        !            78: 19,200 baud.   For a table of  legal baud rates, see  the Lexicon entry for
        !            79: ssggttttyy.hh.
        !            80: 
        !            81: To  change the  default value  for  a port,  you must  use the  /ccoonnff/ppaattcchh
        !            82: command.  For  example, to change the  default speed for port  ccoomm22 to 2400
        !            83: baud, enter the following command while running as the superuser:
        !            84: 
        !            85:     /conf/patch /drv/al1 C2BAUD_=12
        !            86: 
        !            87: The change  will not  take effect  until the next  time that you  boot your
        !            88: system.
        !            89: 
        !            90: _L_o_a_d_i_n_g _a _D_r_i_v_e_r
        !            91: COHERENT 286  version 3.2 and later implements all  COM drivers as loadable
        !            92: drivers.  This  was done to  save space within  the kernel, and  to let you
        !            93: configure your  system as you  prefer.  COHERENT 386 version  4.0 links all
        !            94: COM drivers into the kernel.  The  rest of this section applies to users of
        !            95: COHERENT 286, versions 3.2 and later.   It does _n_o_t apply to any release of
        !            96: COHERENT prior to version 3.2.
        !            97: 
        !            98: To  load  a  COM  driver, you  must  use  the  command  ddrrvvlldd to  load  the
        !            99: appropriate  aall  device.   As  noted  above,  drivers  ccoomm11  and  ccoomm33  are
        !           100: controlled by device aall00, and drivers ccoomm22 and ccoomm44 by aall11. For example, to
        !           101: load aall00 use the command:
        !           102: 
        !           103:     /etc/drvld /drv/al0
        !           104: 
        !           105: To remove a COM driver, first type the command
        !           106: 
        !           107:     ps -d
        !           108: 
        !           109: and  note the  process identifier  of the  COM driver  you want  to remove.
        !           110: Then, become the superuser rroooott and type the command
        !           111: 
        !           112:     kill  -9 _x_x_x_x
        !           113: 
        !           114: where _x_x_x_x is the process identifier for the COM driver.
        !           115: 
        !           116: Note that aall00 is in directory /ddrrvv, _n_o_t /ddeevv.
        !           117: 
        !           118: If you  are going to load  certain drivers regularly, be  sure to write the
        !           119: appropriate ddrrvvlldd command into system file /eettcc/ddrrvvlldd.aallll.
        !           120: 
        !           121: _S_e_e _A_l_s_o
        !           122: ccoomm11, ccoomm22, ccoomm33, ccoomm44, ddeevviiccee ddrriivveerrss, ddrrvvlldd
        !           123: 
        !           124: _D_i_a_g_n_o_s_t_i_c_s
        !           125: An  attempt to  open a  non-existent device  will generate  error messages.
        !           126: This can occur if hardware is absent or not turned on.
        !           127: 
        !           128: _N_o_t_e_s
        !           129: The ccoomm family  of devices apply only to COHERENT  286.  To access a serial
        !           130: port under COHERENT 386, use the  driver aassyy, which is described in its own
        !           131: Lexicon entry.
        !           132: 
        !           133: The ccoomm*  series of devices are not compatible  with the iiooccttll() parameters
        !           134: defined in header file <tteerrmmiioo.hh>. Be sure to include header file <ssggttttyy.hh>
        !           135: if you wish to perform terminal specific iiooccttll() calls.
        !           136: 
        !           137: In the  current version of  these drivers, the following  sequence of steps
        !           138: results in a panic:
        !           139: 
        !           140:     enable com4pl
        !           141:     enable com3pl
        !           142:     disable com4pl
        !           143:     kill kill <al1 driver process id>
        !           144: 
        !           145: The  key  is that  the  driver  containing the  polling  routine cannot  be
        !           146: unloaded if the other driver is still polling.
        !           147: 
        !           148: Note, too,  that if any ccoomm  device driver is used in  polling mode, the hhss
        !           149: driver cannot be used, and vice versa.
        !           150: 
        !           151: Source for  these device drivers,  is provided in  with the driver  kit, in
        !           152: source  files aall.cc,  aallbbaauudd.cc,  and aallxx.cc.  In the  production releases  of
        !           153: COHERENT 4.0.0  and later,  these devices  are supplanted by  device driver
        !           154: aassyy.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.