gemini@geminix.in-berlin.de (Uwe Doering) (06/24/91)
Submitted-by: gemini@geminix.in-berlin.de Archive-name: fas209/part04 #!/bin/sh # this is fas209.04 (part 4 of fas209) # do not concatenate these parts, unpack them in order with /bin/sh # file fas.h continued # if test ! -r _shar_seq_.tmp; then echo 'Please unpack part 1 first!' exit 1 fi (read Scheck if test "$Scheck" != 4; then echo Please unpack part "$Scheck" next! exit 1 else exit 0 fi ) < _shar_seq_.tmp || exit 1 if test ! -f _shar_wnt_.tmp; then echo 'x - still skipping fas.h' else echo 'x - continuing file fas.h' sed 's/^X//' << 'SHAR_EOF' >> 'fas.h' && X#else X#define SPLWRK spl6 /* SPL for character processing */ X#define SPLINT spltty /* SPL to disable FAS interrupts */ X#endif X X#if ((EVENT_TIME) * (HZ) / 1000) == 0 X#undef EVENT_TIME X#define EVENT_TIME (1000 / (HZ)) X#endif X X#if (MAX_UNIX_FILL) > (TTYHOG) X#undef MAX_UNIX_FILL X#define MAX_UNIX_FILL (TTYHOG) X#endif X X#if (MAX_VPIX_FILL) > (TTYHOG) X#undef MAX_VPIX_FILL X#define MAX_VPIX_FILL (TTYHOG) X#endif X X#if (MIN_READ_CHUNK) > ((MAX_UNIX_FILL) / 2) X#undef MIN_READ_CHUNK X#define MIN_READ_CHUNK ((MAX_UNIX_FILL) / 2) X#endif X X#if (MIN_READ_CHUNK) > ((MAX_VPIX_FILL) / 2) X#undef MIN_READ_CHUNK X#define MIN_READ_CHUNK ((MAX_VPIX_FILL) / 2) X#endif X X#define MAX_INPUT_FIFO_SIZE INPUT_NS_FIFO_SIZE X#define MAX_OUTPUT_FIFO_SIZE OUTPUT_NS_FIFO_SIZE X X X/* Here are the modem control flags for the fas_modem array in space.c. X They are arranged in three 8-bit masks which are combined to a 32-bit X word. Each of these 32-bit words represents one entry in the fas_modem X array. X X The lowest byte is used as a mask to manipulate the modem control X register for modem disable. Use the MC_* macros to build the mask. X X The second lowest byte is used as a mask to manipulate the modem control X register for modem enable during dialout. Use the MC_* macros to build X the mask and shift them 8 bits to the left. X X The second highest byte is used as a mask to manipulate the modem control X register for modem enable during dialin. Use the MC_* macros to build X the mask and shift them 16 bits to the left. X X The highest byte is used to mask signals from the modem status X register that will be used as the carrier detect signal. Use the MS_* X macros to build the mask and shift them 24 bits to the left. If you use X more than one signal, carrier is considered on only when all signals X are on. X X Here are some useful macros for the space.c file. You may create your X own macros if you have some special requirements not met by the X predefined ones. X*/ X X/* modem disable (choose one) */ X#define DI_RTS ((ulong) MC_SET_RTS) X#define DI_DTR ((ulong) MC_SET_DTR) X#define DI_RTS_AND_DTR ((ulong) (MC_SET_RTS | MC_SET_DTR)) X X/* modem enable for dialout (choose one) */ X#define EO_RTS ((ulong) MC_SET_RTS << 8) X#define EO_DTR ((ulong) MC_SET_DTR << 8) X#define EO_RTS_AND_DTR ((ulong) (MC_SET_RTS | MC_SET_DTR) << 8) X X/* modem enable for dialin (choose one) */ X#define EI_RTS ((ulong) MC_SET_RTS << 16) X#define EI_DTR ((ulong) MC_SET_DTR << 16) X#define EI_RTS_AND_DTR ((ulong) (MC_SET_RTS | MC_SET_DTR) << 16) X X/* carrier detect signal (choose one) */ X#define CA_DCD ((ulong) MS_DCD_PRESENT << 24) X#define CA_CTS ((ulong) MS_CTS_PRESENT << 24) X#define CA_DSR ((ulong) MS_DSR_PRESENT << 24) X X X/* Here are the hardware handshake flags for the fas_flow array in space.c. X They are arranged in three 8-bit masks which are combined to a 32-bit X word. Each of these 32-bit words represents one entry in the fas_flow X array. X X The lowest byte is used as a mask to manipulate the modem control X register for input flow control. Use the MC_* macros to build the mask. X X The second lowest byte is used to mask signals from the modem status X register that will be used for output flow control. Use the MS_* macros X to build the mask and shift them 8 bits to the left. If you use more X than one signal, output is allowed only when all signals are on. X X The second highest byte is used to mask signals from the modem status X register that will be used to enable the output flow control selected X by the second lowest byte. Use the MS_* macros to build the mask and X shift them 16 bits to the left. If you use more than one signal, output X flow control is enabled only when all signals are on. X X The highest byte is used as a mask to manipulate the modem control X register for output half duplex flow control. Use the MC_* macros to X build the mask and shift them 24 bits to the left. X X Here are some useful macros for the space.c file. You may create your X own macros if you have some special requirements not met by the X predefined ones. X*/ X X/* input flow control (choose one) */ X#define HI_RTS ((ulong) MC_SET_RTS) X#define HI_DTR ((ulong) MC_SET_DTR) X#define HI_RTS_AND_DTR ((ulong) (MC_SET_RTS | MC_SET_DTR)) X X/* output flow control (choose one) */ X#define HO_CTS ((ulong) MS_CTS_PRESENT << 8) X#define HO_DSR ((ulong) MS_DSR_PRESENT << 8) X#define HO_CTS_AND_DSR ((ulong) (MS_CTS_PRESENT | MS_DSR_PRESENT) \ X << 8) X#define HO_CTS_ON_DSR (((ulong) MS_CTS_PRESENT << 8) \ X | ((ulong) MS_DSR_PRESENT << 16)) X#define HO_CTS_ON_DSR_AND_DCD (((ulong) MS_CTS_PRESENT << 8) \ X | ((ulong) (MS_DSR_PRESENT | MS_DCD_PRESENT) \ X << 16)) X X/* output hdx flow control (choose one) */ X#define HX_RTS ((ulong) MC_SET_RTS << 24) X#define HX_DTR ((ulong) MC_SET_DTR << 24) X#define HX_RTS_AND_DTR ((ulong) (MC_SET_RTS | MC_SET_DTR) << 24) X X X/* define the local open flags */ X X#define OS_DEVICE_CLOSED 0x0000 X#define OS_OPEN_FOR_DIALOUT 0x0001 X#define OS_OPEN_FOR_GETTY 0x0002 X#define OS_WAIT_OPEN 0x0004 X#define OS_NO_DIALOUT 0x0008 X#define OS_FAKE_CARR_ON 0x0010 X#define OS_CLOCAL 0x0020 X#define OS_HWO_HANDSHAKE 0x0040 X#define OS_HWI_HANDSHAKE 0x0080 X#define OS_HDX_HANDSHAKE 0x0100 X#define OS_EXCLUSIVE_OPEN_1 0x0200 X#define OS_EXCLUSIVE_OPEN_2 0x0400 /* SYSV 3.2 Xenix compatibility */ X X#define OS_OPEN_STATES (OS_OPEN_FOR_DIALOUT | OS_OPEN_FOR_GETTY) X#define OS_TEST_MASK (OS_OPEN_FOR_DIALOUT | OS_NO_DIALOUT \ X | OS_FAKE_CARR_ON | OS_CLOCAL \ X | OS_HWO_HANDSHAKE | OS_HWI_HANDSHAKE \ X | OS_HDX_HANDSHAKE | OS_EXCLUSIVE_OPEN_1 \ X | OS_EXCLUSIVE_OPEN_2) X#define OS_SU_TEST_MASK (OS_OPEN_FOR_DIALOUT | OS_NO_DIALOUT \ X | OS_FAKE_CARR_ON | OS_CLOCAL \ X | OS_HWO_HANDSHAKE | OS_HWI_HANDSHAKE \ X | OS_HDX_HANDSHAKE | OS_EXCLUSIVE_OPEN_1) X X/* define the device status flags */ X X#define DF_DEVICE_CONFIGURED 0x0001 /* device is configured */ X#define DF_DEVICE_IS_NS16550A 0x0002 /* it's an NS16550A */ X#define DF_DEVICE_IS_I82510 0x0004 /* it's an I82510 */ X#define DF_CTL_FIRST 0x0008 /* write ctl port at first access */ X#define DF_CTL_EVERY 0x0010 /* write ctl port at every access */ X#define DF_DEVICE_OPEN 0x0020 /* physical device is open */ X#define DF_DEVICE_LOCKED 0x0040 /* physical device locked */ X#define DF_MODEM_ENABLED 0x0080 /* modem enabled */ X#define DF_XMIT_BUSY 0x0100 /* transmitter busy */ X#define DF_XMIT_BREAK 0x0200 /* transmitter sends break */ X#define DF_XMIT_LOCKED 0x0400 /* transmitter locked against output */ X#define DF_DO_HANGUP 0x0800 /* delayed hangup request */ X#define DF_DO_BREAK 0x1000 /* delayed break request */ X#define DF_GUARD_TIMEOUT 0x2000 /* protect last char from corruption */ X#define DF_NS16550A_DROP_MODE 0x4000 /* receiver trigger level is dropped */ X#define DF_MSI_ENABLED 0x8000 /* modem status interrupts enabled */ X X/* define the flow control status flags */ X X#define FF_HWO_HANDSHAKE 0x0001 /* output hw handshake enabled */ X#define FF_HWI_HANDSHAKE 0x0002 /* input hw handshake enabled */ X#define FF_HDX_HANDSHAKE 0x0004 /* output hdx hw handshake enabled */ X#define FF_HWO_STOPPED 0x0008 /* output stopped by hw handshake */ X#define FF_HWI_STOPPED 0x0010 /* input stopped by hw handshake */ X#define FF_HDX_STARTED 0x0020 /* output buffer contains characters */ X#define FF_SWO_STOPPED 0x0040 /* output stopped by sw flow control */ X#define FF_SWI_STOPPED 0x0080 /* input stopped by sw flow control */ X#define FF_SW_FC_REQ 0x0100 /* sw input flow control request */ X#define FF_RXFER_STOPPED 0x0200 /* rxfer function stopped */ X X/* define the scheduled events flags */ X X#define EF_DO_RXFER 0x0001 /* rxfer function request */ X#define EF_DO_XXFER 0x0002 /* xxfer function request */ X#define EF_DO_BRKINT 0x0004 /* break int request */ X#define EF_DO_MPROC 0x0008 /* mproc function request */ X#define EF_SIGNAL_VPIX 0x0010 /* send pseudorupt to VP/ix */ X#define EF_EMPTY_EVENT 0x0020 /* force execution of event_sched() */ X X/* define an easy way to reference the port structures */ X X#define RCV_DATA_PORT (fip->port_0) X#define XMT_DATA_PORT (fip->port_0) X#define INT_ENABLE_PORT (fip->port_1) X#define INT_ID_PORT (fip->port_2) X#define NS_FIFO_CTL_PORT (fip->port_2) X#define I_BANK_PORT (fip->port_2) X#define LINE_CTL_PORT (fip->port_3) X#define MDM_CTL_PORT (fip->port_4) X#define I_IDM_PORT (fip->port_4) X#define LINE_STATUS_PORT (fip->port_5) X#define I_RCM_PORT (fip->port_5) X#define MDM_STATUS_PORT (fip->port_6) X#define I_TCM_PORT (fip->port_6) X#define DIVISOR_LSB_PORT (fip->port_0) X#define DIVISOR_MSB_PORT (fip->port_1) X#define CTL_PORT (fip->ctl_port) X X/* modem control port */ X X#define MC_SET_DTR 0x01 X#define MC_SET_RTS 0x02 X#define MC_SET_OUT1 0x04 X#define MC_SET_OUT2 0x08 /* tristates int line when false */ X#define MC_SET_LOOPBACK 0x10 X X#define MC_ANY_CONTROL (MC_SET_DTR | MC_SET_RTS) X X/* modem status port */ X X#define MS_CTS_DELTA 0x01 X#define MS_DSR_DELTA 0x02 X#define MS_RING_TEDGE 0x04 X#define MS_DCD_DELTA 0x08 X#define MS_CTS_PRESENT 0x10 X#define MS_DSR_PRESENT 0x20 X#define MS_RING_PRESENT 0x40 X#define MS_DCD_PRESENT 0x80 X X#define MS_ANY_DELTA (MS_CTS_DELTA | MS_DSR_DELTA | MS_RING_TEDGE \ X | MS_DCD_DELTA) X#define MS_ANY_PRESENT (MS_CTS_PRESENT | MS_DSR_PRESENT | MS_RING_PRESENT \ X | MS_DCD_PRESENT) X X/* interrupt enable port */ X X#define IE_NONE 0x00 X#define IE_RECV_DATA_AVAILABLE 0x01 X#define IE_XMIT_HOLDING_BUFFER_EMPTY 0x02 X#define IE_LINE_STATUS 0x04 X#define IE_MODEM_STATUS 0x08 X X#define IE_INIT_MODE (IE_RECV_DATA_AVAILABLE | IE_XMIT_HOLDING_BUFFER_EMPTY \ X | IE_LINE_STATUS) X X/* interrupt id port */ X X#define II_NO_INTS_PENDING 0x01 X#define II_CODE_MASK 0x07 X#define II_MODEM_STATE 0x00 X#define II_XMTD_CHAR 0x02 X#define II_RCVD_CHAR 0x04 X#define II_RCV_ERROR 0x06 X#define II_NS_FIFO_TIMEOUT 0x08 X#define II_NS_FIFO_ENABLED 0xC0 X X/* line control port */ X X#define LC_WORDLEN_MASK 0x03 X#define LC_WORDLEN_5 0x00 X#define LC_WORDLEN_6 0x01 X#define LC_WORDLEN_7 0x02 X#define LC_WORDLEN_8 0x03 X#define LC_STOPBITS_LONG 0x04 X#define LC_ENABLE_PARITY 0x08 X#define LC_EVEN_PARITY 0x10 X#define LC_STICK_PARITY 0x20 X#define LC_SET_BREAK_LEVEL 0x40 X#define LC_ENABLE_DIVISOR 0x80 X X/* line status port */ X X#define LS_RCV_AVAIL 0x01 X#define LS_OVERRUN 0x02 X#define LS_PARITY_ERROR 0x04 X#define LS_FRAMING_ERROR 0x08 X#define LS_BREAK_DETECTED 0x10 X#define LS_XMIT_AVAIL 0x20 X#define LS_XMIT_COMPLETE 0x40 X#define LS_ERROR_IN_NS_FIFO 0x80 /* NS16550A only */ X X#define LS_RCV_INT (LS_RCV_AVAIL | LS_OVERRUN | LS_PARITY_ERROR \ X | LS_FRAMING_ERROR | LS_BREAK_DETECTED) X X/* fifo control port (NS16550A only) */ X X#define NS_FIFO_ENABLE 0x01 X#define NS_FIFO_CLR_RECV 0x02 X#define NS_FIFO_CLR_XMIT 0x04 X#define NS_FIFO_START_DMA 0x08 X#define NS_FIFO_SIZE_1 0x00 X#define NS_FIFO_SIZE_4 0x40 X#define NS_FIFO_SIZE_8 0x80 X#define NS_FIFO_SIZE_14 0xC0 X#define NS_FIFO_SIZE_MASK 0xC0 X X#define NS_FIFO_CLEAR_CMD 0 X#define NS_FIFO_DROP_CMD (NS_FIFO_SIZE_1 | NS_FIFO_ENABLE) X#define NS_FIFO_SETUP_CMD (NS_FIFO_SIZE_4 | NS_FIFO_ENABLE) X#define NS_FIFO_INIT_CMD (NS_FIFO_SETUP_CMD | NS_FIFO_CLR_RECV \ X | NS_FIFO_CLR_XMIT) X X#define INPUT_NS_FIFO_SIZE 16 X#define OUTPUT_NS_FIFO_SIZE 16 X X/* fifo control ports (i82510 only) */ X X#define I_BANK_0 0x00 X#define I_BANK_1 0x20 X#define I_BANK_2 0x40 X#define I_BANK_3 0x60 X#define I_FIFO_ENABLE 0x08 X#define I_FIFO_CLR_RECV 0x30 X#define I_FIFO_CLR_XMIT 0x0c X X#define I_FIFO_CLEAR_CMD 0 X#define I_FIFO_SETUP_CMD I_FIFO_ENABLE X X#define INPUT_I_FIFO_SIZE 4 X#define OUTPUT_I_FIFO_SIZE 4 X X/* defines for ioctl calls (VP/ix) */ X X#define AIOC ('A'<<8) X#define AIOCINTTYPE (AIOC|60) /* set interrupt type */ X#define AIOCDOSMODE (AIOC|61) /* set DOS mode */ X#define AIOCNONDOSMODE (AIOC|62) /* reset DOS mode */ X#define AIOCSERIALOUT (AIOC|63) /* serial device data write */ X#define AIOCSERIALIN (AIOC|64) /* serial device data read */ X#define AIOCSETSS (AIOC|65) /* set start/stop chars */ X#define AIOCINFO (AIOC|66) /* tell us what device we are */ X X/* ioctl alternate names used by VP/ix */ X X#define VPC_SERIAL_DOS AIOCDOSMODE X#define VPC_SERIAL_NONDOS AIOCNONDOSMODE X#define VPC_SERIAL_INFO AIOCINFO X#define VPC_SERIAL_OUT AIOCSERIALOUT X#define VPC_SERIAL_IN AIOCSERIALIN X X/* serial in/out requests */ X X#define SO_DIVLLSB 1 X#define SO_DIVLMSB 2 X#define SO_LCR 3 X#define SO_MCR 4 X#define SI_MSR 1 X#define SIO_MASK(x) (1<<((x)-1)) X X X/* This structure contains everything one would like to know about X an open device. There is one of it for each physical unit. X X We use several unions to eliminate most integer type conversions X at run-time. The standard UNIX V 3.X/386 C compiler forces all X operands in expressions and all function parameters to type int. X To save some time, with the means of unions we deliver type int X at the proper locations while dealing with the original type X wherever int would be slower. X X This is highly compiler implementation specific. But for the sake X of speed the end justifies the means. X X Take care that the size of the area that contains the various X structure fields (up to, but excluding the ring buffers) X is <= 128 bytes. Otherwise a 4-byte offset is used to access X some of the structure fields. For the first 128 bytes a 1-byte X offset is used, which is faster. X*/ X Xstruct fas_info X{ X struct tty *tty; /* the tty structure */ X struct fas_info *prev_int_user;/* link to previous fas_info struct */ X struct fas_info *next_int_user;/* link to next fas_info struct */ X int timeout_idx; /* timeout index for untimeout () */ X uint iflag; /* current terminal input flags */ X uint cflag; /* current terminal hardware control flags */ X union { /* flags about the device state */ X ushort s; X uint i; X } device_flags; X union { /* flags about the flow control state */ X ushort s; X uint i; X } flow_flags; X union { /* flags about the scheduled events */ X ushort s; X uint i; X } event_flags; X uint o_state; /* current open state */ X uint po_state; /* previous open state */ X union { /* modem control masks */ X struct { X unchar di; /* mask for modem disable */ X unchar eo; /* mask for modem enable (dialout) */ X unchar ei; /* mask for modem enable (dialin) */ X unchar ca; /* mask for carrier detect */ X } m; X ulong l; X } modem; X union { /* hardware flow control masks */ X struct { X unchar ic; /* control mask for inp. flow ctrl */ X unchar oc; /* control mask for outp. flow ctrl */ X unchar oe; /* enable mask for outp. flow ctrl */ X unchar hc; /* control mask for hdx flow ctrl */ X } m; X ulong l; X } flow; X unchar msr; /* modem status register value */ X unchar new_msr; /* new modem status register value */ X unchar mcr; /* modem control register value */ X unchar lcr; /* line control register value */ X unchar ier; /* interrupt enable register value */ X unchar vec; /* interrupt vector for this struct */ X#if defined (HAVE_VPIX) X unchar v86_intmask; /* VP/ix pseudorupt mask */ X v86_t *v86_proc; /* VP/ix v86proc pointer for pseudorupts */ X struct termss v86_ss; /* VP/ix start/stop characters */ X#endif X uint ctl_port; /* muliplexer control port */ X union { /* uart port addresses and control values */ X uint addr; X struct { X ushort addr; X unchar ctl; X } p; X } port_0, port_1, port_2, port_3, port_4, port_5, port_6; X uint recv_ring_cnt; /* receiver ring buffer counter */ X unchar *recv_ring_put_ptr; /* recv ring buf put ptr */ X unchar *recv_ring_take_ptr; /* recv ring buf take ptr */ X ushort xmit_fifo_size; /* transmitter FIFO size */ X ushort xmit_ring_size; /* transmitter ring buffer size */ X uint xmit_ring_cnt; /* transmitter ring buffer counter */ X unchar *xmit_ring_put_ptr; /* xmit ring buf put ptr */ X unchar *xmit_ring_take_ptr; /* xmit ring buf take ptr */ X unchar recv_buffer [RECV_BUFF_SIZE]; /* recv ring buf */ X unchar xmit_buffer [XMIT_BUFF_SIZE]; /* xmit ring buf */ X}; SHAR_EOF echo 'File fas.h is complete' && true || echo 'restore of fas.h failed' rm -f _shar_wnt_.tmp fi # ============= i_fas-ast4 ============== if test -f 'i_fas-ast4' -a X"$1" != X"-c"; then echo 'x - skipping i_fas-ast4 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting i_fas-ast4 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'i_fas-ast4' && XF0:23:off:/etc/getty ttyFM00 9600 XF1:23:off:/etc/getty ttyFM01 9600 XF2:23:off:/etc/getty ttyFM02 9600 XF3:23:off:/etc/getty ttyFM03 9600 SHAR_EOF true || echo 'restore of i_fas-ast4 failed' rm -f _shar_wnt_.tmp fi # ============= i_fas-ast4c12 ============== if test -f 'i_fas-ast4c12' -a X"$1" != X"-c"; then echo 'x - skipping i_fas-ast4c12 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting i_fas-ast4c12 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'i_fas-ast4c12' && XF0:23:off:/etc/getty ttyFM00 9600 XF1:23:off:/etc/getty ttyFM01 9600 XF2:23:off:/etc/getty ttyFM02 9600 XF3:23:off:/etc/getty ttyFM03 9600 XF4:23:off:/etc/getty ttyFM04 9600 XF5:23:off:/etc/getty ttyFM05 9600 SHAR_EOF true || echo 'restore of i_fas-ast4c12 failed' rm -f _shar_wnt_.tmp fi # ============= i_fas-c1-2 ============== if test -f 'i_fas-c1-2' -a X"$1" != X"-c"; then echo 'x - skipping i_fas-c1-2 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting i_fas-c1-2 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'i_fas-c1-2' && XF0:23:off:/etc/getty ttyFM00 9600 XF1:23:off:/etc/getty ttyFM01 9600 SHAR_EOF true || echo 'restore of i_fas-c1-2 failed' rm -f _shar_wnt_.tmp fi # ============= i_fas-c1-3 ============== if test -f 'i_fas-c1-3' -a X"$1" != X"-c"; then echo 'x - skipping i_fas-c1-3 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting i_fas-c1-3 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'i_fas-c1-3' && XF0:23:off:/etc/getty ttyFM00 9600 XF1:23:off:/etc/getty ttyFM01 9600 XF2:23:off:/etc/getty ttyFM02 9600 SHAR_EOF true || echo 'restore of i_fas-c1-3 failed' rm -f _shar_wnt_.tmp fi # ============= i_fas-hub6 ============== if test -f 'i_fas-hub6' -a X"$1" != X"-c"; then echo 'x - skipping i_fas-hub6 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting i_fas-hub6 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'i_fas-hub6' && XF0:23:off:/etc/getty ttyFM00 9600 XF1:23:off:/etc/getty ttyFM01 9600 XF2:23:off:/etc/getty ttyFM02 9600 XF3:23:off:/etc/getty ttyFM03 9600 XF4:23:off:/etc/getty ttyFM04 9600 XF5:23:off:/etc/getty ttyFM05 9600 SHAR_EOF true || echo 'restore of i_fas-hub6 failed' rm -f _shar_wnt_.tmp fi # ============= n_fas-ast4 ============== if test -f 'n_fas-ast4' -a X"$1" != X"-c"; then echo 'x - skipping n_fas-ast4 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting n_fas-ast4 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'n_fas-ast4' && Xfas ttyF00 c 80 Xfas ttyF01 c 81 Xfas ttyF02 c 82 Xfas ttyF03 c 83 Xfas ttyFM00 c 208 Xfas ttyFM01 c 209 Xfas ttyFM02 c 210 Xfas ttyFM03 c 211 SHAR_EOF true || echo 'restore of n_fas-ast4 failed' rm -f _shar_wnt_.tmp fi # ============= n_fas-ast4c12 ============== if test -f 'n_fas-ast4c12' -a X"$1" != X"-c"; then echo 'x - skipping n_fas-ast4c12 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting n_fas-ast4c12 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'n_fas-ast4c12' && Xfas ttyF00 c 80 Xfas ttyF01 c 81 Xfas ttyF02 c 82 Xfas ttyF03 c 83 Xfas ttyF04 c 84 Xfas ttyF05 c 85 Xfas ttyFM00 c 208 Xfas ttyFM01 c 209 Xfas ttyFM02 c 210 Xfas ttyFM03 c 211 Xfas ttyFM04 c 212 Xfas ttyFM05 c 213 SHAR_EOF true || echo 'restore of n_fas-ast4c12 failed' rm -f _shar_wnt_.tmp fi # ============= n_fas-c1-2 ============== if test -f 'n_fas-c1-2' -a X"$1" != X"-c"; then echo 'x - skipping n_fas-c1-2 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting n_fas-c1-2 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'n_fas-c1-2' && Xfas ttyF00 c 80 Xfas ttyF01 c 81 Xfas ttyFM00 c 208 Xfas ttyFM01 c 209 SHAR_EOF true || echo 'restore of n_fas-c1-2 failed' rm -f _shar_wnt_.tmp fi # ============= n_fas-c1-3 ============== if test -f 'n_fas-c1-3' -a X"$1" != X"-c"; then echo 'x - skipping n_fas-c1-3 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting n_fas-c1-3 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'n_fas-c1-3' && Xfas ttyF00 c 80 Xfas ttyF01 c 81 Xfas ttyF02 c 82 Xfas ttyFM00 c 208 Xfas ttyFM01 c 209 Xfas ttyFM02 c 210 SHAR_EOF true || echo 'restore of n_fas-c1-3 failed' rm -f _shar_wnt_.tmp fi # ============= n_fas-hub6 ============== if test -f 'n_fas-hub6' -a X"$1" != X"-c"; then echo 'x - skipping n_fas-hub6 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting n_fas-hub6 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'n_fas-hub6' && Xfas ttyF00 c 80 Xfas ttyF01 c 81 Xfas ttyF02 c 82 Xfas ttyF03 c 83 Xfas ttyF04 c 84 Xfas ttyF05 c 85 Xfas ttyFM00 c 208 Xfas ttyFM01 c 209 Xfas ttyFM02 c 210 Xfas ttyFM03 c 211 Xfas ttyFM04 c 212 Xfas ttyFM05 c 213 SHAR_EOF true || echo 'restore of n_fas-hub6 failed' rm -f _shar_wnt_.tmp fi # ============= s_fas-ast4 ============== if test -f 's_fas-ast4' -a X"$1" != X"-c"; then echo 'x - skipping s_fas-ast4 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting s_fas-ast4 (Text)' sed 's/^X//' << 'SHAR_EOF' > 's_fas-ast4' && Xfas Y 4 7 1 4 2a0 2bf 0 0 SHAR_EOF true || echo 'restore of s_fas-ast4 failed' rm -f _shar_wnt_.tmp fi # ============= s_fas-ast4c12 ============== if test -f 's_fas-ast4c12' -a X"$1" != X"-c"; then echo 'x - skipping s_fas-ast4c12 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting s_fas-ast4c12 (Text)' sed 's/^X//' << 'SHAR_EOF' > 's_fas-ast4c12' && Xfas Y 4 7 1 9 2a0 2bf 0 0 Xfas Y 1 7 1 4 3f8 3ff 0 0 Xfas Y 1 7 1 3 2f8 2ff 0 0 SHAR_EOF true || echo 'restore of s_fas-ast4c12 failed' rm -f _shar_wnt_.tmp fi # ============= s_fas-c1-2 ============== if test -f 's_fas-c1-2' -a X"$1" != X"-c"; then echo 'x - skipping s_fas-c1-2 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting s_fas-c1-2 (Text)' sed 's/^X//' << 'SHAR_EOF' > 's_fas-c1-2' && Xfas Y 1 7 1 4 3f8 3ff 0 0 Xfas Y 1 7 1 3 2f8 2ff 0 0 SHAR_EOF true || echo 'restore of s_fas-c1-2 failed' rm -f _shar_wnt_.tmp fi # ============= s_fas-c1-3 ============== if test -f 's_fas-c1-3' -a X"$1" != X"-c"; then echo 'x - skipping s_fas-c1-3 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting s_fas-c1-3 (Text)' sed 's/^X//' << 'SHAR_EOF' > 's_fas-c1-3' && Xfas Y 1 7 1 4 3f8 3ff 0 0 Xfas Y 1 7 1 3 2f8 2ff 0 0 Xfas Y 1 7 1 9 3e8 3ef 0 0 SHAR_EOF true || echo 'restore of s_fas-c1-3 failed' rm -f _shar_wnt_.tmp fi # ============= s_fas-hub6 ============== if test -f 's_fas-hub6' -a X"$1" != X"-c"; then echo 'x - skipping s_fas-hub6 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting s_fas-hub6 (Text)' sed 's/^X//' << 'SHAR_EOF' > 's_fas-hub6' && Xfas Y 6 7 1 3 302 308 0 0 SHAR_EOF true || echo 'restore of s_fas-hub6 failed' rm -f _shar_wnt_.tmp fi # ============= space-ast4 ============== if test -f 'space-ast4' -a X"$1" != X"-c"; then echo 'x - skipping space-ast4 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting space-ast4 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'space-ast4' && X/* Async device configuration file for the FAS async driver. */ X X/* This version is for the AST 4-port card in expanded mode. X*/ X X/* FAS was developed by XUwe Doering INET : gemini@geminix.in-berlin.de XBillstedter Pfad 17 b UUCP : ...!unido!fub!geminix.in-berlin.de!gemini X1000 Berlin 20 XGermany X*/ X X#if !defined (M_I286) X#ident "@(#)space.c 2.09" X#endif X X#if defined (XENIX) X#include "fas.h" X#else X#include <sys/fas.h> X#endif X X/* This is the number of devices to be handled by this driver. X You may define up to 16 devices. If this number is changed X the arrays below must be filled in accordingly. X*/ X#define NUM_PHYSICAL_UNITS 4 X X#if NUM_PHYSICAL_UNITS > MAX_UNITS X#undef NUM_PHYSICAL_UNITS X#define NUM_PHYSICAL_UNITS MAX_UNITS X#endif X X/* let the driver know the number of devices */ Xuint fas_physical_units = NUM_PHYSICAL_UNITS; X X/* array of base port addresses X If you deliberately want to force off the FIFOs of a UART you have X to "or" the NO_FIFO macro to its base port address. This is useful X for mouse devices where you need immediate response to the mouse X movement. X*/ Xulong fas_port [NUM_PHYSICAL_UNITS] = X{ X 0x2a0, 0x2a8, 0x2b0, 0x2b8 X}; X X/* array of interrupt vectors */ Xuint fas_vec [NUM_PHYSICAL_UNITS] = X{ X 0x4, 0x4, 0x4, 0x4 X}; X X/* initialization sequence for serial card X This array contains pairs of values of the form: X X portaddress, value, X : X : X portaddress, value, X 0 X X For every line `value' will be written to `portaddress'. If X `value' is replaced with the macro `READ_PORT' then a value X is read from `portaddress' instead. The value itself will be X discarded. Therefore, this makes only sense if the read access X to the port has a side effect like setting or resetting X certain flags. X X NOTE: This array *must* be terminated with a value of 0 X in the portaddress column! X*/ Xuint fas_init_seq [] = X{ X 0x2bf, 0x80, X 0 X}; X X/* initial modem control port info X This value is ored into the modem control value for each UART. This is X normaly used to force out2 which is used to enable the interrupts of X the standard com1 and com2 ports. Several brands of cards have modes X that allow them to work in compatible mode like com1 and com2 or as a X shared interrupts card. One of these cards is the AST 4-port card. When X this card is used in shared interrupts mode out2 must _not_ be set. X X Note: This is one of the major trouble-spots with shared interrupts X cards. Check your manual. X*/ Xuint fas_mcb [NUM_PHYSICAL_UNITS] = X{ X 0, 0, 0, 0 X}; X X/* array of modem control flags X You can choose which signals to use for modem control. See fas.h X for possible names and values. Whether or not modem control is X used is determined by the minor device number at open time. X*/ Xulong fas_modem [NUM_PHYSICAL_UNITS] = X{ X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD X}; X X/* array of hardware flow control flags X You can choose which signals to use for hardware handshake. See fas.h X for possible names and values. Whether or not hardware handshake is X used is determined by the minor device number at open time and by the X RTSFLOW/CTSFLOW termio(7) flags. X*/ Xulong fas_flow [NUM_PHYSICAL_UNITS] = X{ X HI_RTS | HO_CTS_ON_DSR | HX_RTS, X HI_RTS | HO_CTS_ON_DSR | HX_RTS, X HI_RTS | HO_CTS_ON_DSR | HX_RTS, X HI_RTS | HO_CTS_ON_DSR | HX_RTS X}; X X/* array of control register addresses X There are serial boards available that have all serial ports X multiplexed to one address location in order to save I/O address X space (Bell Tech HUB-6 card etc.). This multiplexing is controlled X by a special register that needs to be written to before the actual X port registers can be accessed. This array contains the addresses X of these special registers. X Enter the addresses on a per unit base. An address of zero X disables this feature. X*/ Xuint fas_ctl_port [NUM_PHYSICAL_UNITS] = X{ X 0, 0, 0, 0 X}; X X/* array of control register values X These values are written to the corresponding control register X before the first access to the actual port registers. If not only X entire UART chips (blocks of 8 contiguous addresses) but even the X single registers of the UART chips need to be multiplexed to one X address you have to "or" a bit mask (shifted 8 times to the left) X to the control register value. This mask determines at which bit X locations the UART chip register number is "xored" into the control X register value at runtime. This implies that you can also use X negative logic by setting the bits in the control register value X to 1 at the locations corresponding to the bit mask. X*/ Xuint fas_ctl_val [NUM_PHYSICAL_UNITS] = X{ X 0, 0, 0, 0 X}; X X/* additional configurations for shared interrupts boards X If you have a shared interrupts board, you may have to acknowledge X interrupts by writing to a special register. The following arrays X contain the special register addresses and the corresponding values X that are written to them in response to an interrupt. X*/ X X/* array of int ack register addresses X These registers are written to every time after all interrupt X sources in all of the UARTs that are tied to the corresponding X interrupt vector have been cleared. X Enter the addresses on a per vector base. An address of zero X disables this feature. X*/ Xuint fas_int_ack_port [NUM_INT_VECTORS] = X{ X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0 X}; X X/* array of int ack values X These values are written to the corresponding int ack register X in response to an interrupt. X*/ Xuint fas_int_ack [NUM_INT_VECTORS] = X{ X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0 X}; X X/* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE. X ============================================ X*/ X X/* array of structures to hold all info for a physical minor device */ Xstruct fas_info fas_info [NUM_PHYSICAL_UNITS]; X X/* array of ttys for logical minor devices */ Xstruct tty fas_tty [NUM_PHYSICAL_UNITS * 2]; X X/* array of pointers to fas_info structures X this prevents time consuming multiplications for index calculation X*/ Xstruct fas_info *fas_info_ptr [NUM_PHYSICAL_UNITS]; X X/* array of pointers to fas_tty structures X this prevents time consuming multiplications for index calculation X*/ Xstruct tty *fas_tty_ptr [NUM_PHYSICAL_UNITS * 2]; SHAR_EOF true || echo 'restore of space-ast4 failed' rm -f _shar_wnt_.tmp fi # ============= space-ast4c12 ============== if test -f 'space-ast4c12' -a X"$1" != X"-c"; then echo 'x - skipping space-ast4c12 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting space-ast4c12 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'space-ast4c12' && X/* Async device configuration file for the FAS async driver. */ X X/* This version is for the AST 4-port card in expanded mode plus X the standard COM1 and COM2 ports. X*/ X X/* FAS was developed by XUwe Doering INET : gemini@geminix.in-berlin.de XBillstedter Pfad 17 b UUCP : ...!unido!fub!geminix.in-berlin.de!gemini X1000 Berlin 20 XGermany X*/ X X#if !defined (M_I286) X#ident "@(#)space.c 2.09" X#endif X X#if defined (XENIX) X#include "fas.h" X#else X#include <sys/fas.h> X#endif X X/* This is the number of devices to be handled by this driver. X You may define up to 16 devices. If this number is changed X the arrays below must be filled in accordingly. X*/ X#define NUM_PHYSICAL_UNITS 6 X X#if NUM_PHYSICAL_UNITS > MAX_UNITS X#undef NUM_PHYSICAL_UNITS X#define NUM_PHYSICAL_UNITS MAX_UNITS X#endif X X/* let the driver know the number of devices */ Xuint fas_physical_units = NUM_PHYSICAL_UNITS; X X/* array of base port addresses X If you deliberately want to force off the FIFOs of a UART you have X to "or" the NO_FIFO macro to its base port address. This is useful X for mouse devices where you need immediate response to the mouse X movement. X*/ Xulong fas_port [NUM_PHYSICAL_UNITS] = X{ X 0x2a0, 0x2a8, 0x2b0, 0x2b8, X 0x3f8, 0x2f8 X}; X X/* array of interrupt vectors */ Xuint fas_vec [NUM_PHYSICAL_UNITS] = X{ X 0x9, 0x9, 0x9, 0x9, X 0x4, 0x3 X}; X X/* initialization sequence for serial card X This array contains pairs of values of the form: X X portaddress, value, X : X : X portaddress, value, X 0 X X For every line `value' will be written to `portaddress'. If X `value' is replaced with the macro `READ_PORT' then a value X is read from `portaddress' instead. The value itself will be X discarded. Therefore, this makes only sense if the read access X to the port has a side effect like setting or resetting X certain flags. X X NOTE: This array *must* be terminated with a value of 0 X in the portaddress column! X*/ Xuint fas_init_seq [] = X{ X 0x2bf, 0x80, X 0 X}; X X/* initial modem control port info X This value is ored into the modem control value for each UART. This is X normaly used to force out2 which is used to enable the interrupts of X the standard com1 and com2 ports. Several brands of cards have modes X that allow them to work in compatible mode like com1 and com2 or as a X shared interrupts card. One of these cards is the AST 4-port card. When X this card is used in shared interrupts mode out2 must _not_ be set. X X Note: This is one of the major trouble-spots with shared interrupts X cards. Check your manual. X*/ Xuint fas_mcb [NUM_PHYSICAL_UNITS] = X{ X 0, 0, 0, 0, X MC_SET_OUT2, MC_SET_OUT2 X}; X X/* array of modem control flags X You can choose which signals to use for modem control. See fas.h X for possible names and values. Whether or not modem control is X used is determined by the minor device number at open time. X*/ Xulong fas_modem [NUM_PHYSICAL_UNITS] = X{ X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD X}; X X/* array of hardware flow control flags X You can choose which signals to use for hardware handshake. See fas.h X for possible names and values. Whether or not hardware handshake is X used is determined by the minor device number at open time and by the X RTSFLOW/CTSFLOW termio(7) flags. X*/ Xulong fas_flow [NUM_PHYSICAL_UNITS] = X{ X HI_RTS | HO_CTS_ON_DSR | HX_RTS, X HI_RTS | HO_CTS_ON_DSR | HX_RTS, X HI_RTS | HO_CTS_ON_DSR | HX_RTS, X HI_RTS | HO_CTS_ON_DSR | HX_RTS, X HI_RTS | HO_CTS_ON_DSR | HX_RTS, X HI_RTS | HO_CTS_ON_DSR | HX_RTS X}; X X/* array of control register addresses X There are serial boards available that have all serial ports X multiplexed to one address location in order to save I/O address X space (Bell Tech HUB-6 card etc.). This multiplexing is controlled X by a special register that needs to be written to before the actual X port registers can be accessed. This array contains the addresses X of these special registers. X Enter the addresses on a per unit base. An address of zero X disables this feature. X*/ Xuint fas_ctl_port [NUM_PHYSICAL_UNITS] = X{ X 0, 0, 0, 0, X 0, 0 X}; X X/* array of control register values X These values are written to the corresponding control register X before the first access to the actual port registers. If not only X entire UART chips (blocks of 8 contiguous addresses) but even the X single registers of the UART chips need to be multiplexed to one X address you have to "or" a bit mask (shifted 8 times to the left) X to the control register value. This mask determines at which bit X locations the UART chip register number is "xored" into the control X register value at runtime. This implies that you can also use X negative logic by setting the bits in the control register value X to 1 at the locations corresponding to the bit mask. X*/ Xuint fas_ctl_val [NUM_PHYSICAL_UNITS] = X{ X 0, 0, 0, 0, X 0, 0 X}; X X/* additional configurations for shared interrupts boards X If you have a shared interrupts board, you may have to acknowledge X interrupts by writing to a special register. The following arrays X contain the special register addresses and the corresponding values X that are written to them in response to an interrupt. X*/ X X/* array of int ack register addresses X These registers are written to every time after all interrupt X sources in all of the UARTs that are tied to the corresponding X interrupt vector have been cleared. X Enter the addresses on a per vector base. An address of zero X disables this feature. X*/ Xuint fas_int_ack_port [NUM_INT_VECTORS] = X{ X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0 X}; X X/* array of int ack values X These values are written to the corresponding int ack register X in response to an interrupt. X*/ Xuint fas_int_ack [NUM_INT_VECTORS] = X{ X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0 X}; X X/* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE. X ============================================ X*/ X X/* array of structures to hold all info for a physical minor device */ Xstruct fas_info fas_info [NUM_PHYSICAL_UNITS]; X X/* array of ttys for logical minor devices */ Xstruct tty fas_tty [NUM_PHYSICAL_UNITS * 2]; X X/* array of pointers to fas_info structures X this prevents time consuming multiplications for index calculation X*/ Xstruct fas_info *fas_info_ptr [NUM_PHYSICAL_UNITS]; X X/* array of pointers to fas_tty structures X this prevents time consuming multiplications for index calculation X*/ Xstruct tty *fas_tty_ptr [NUM_PHYSICAL_UNITS * 2]; SHAR_EOF true || echo 'restore of space-ast4c12 failed' rm -f _shar_wnt_.tmp fi # ============= space-c1-2 ============== if test -f 'space-c1-2' -a X"$1" != X"-c"; then echo 'x - skipping space-c1-2 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting space-c1-2 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'space-c1-2' && X/* Async device configuration file for the FAS async driver. */ X X/* This version is for the standard COM1 and COM2 ports. X*/ X X/* FAS was developed by XUwe Doering INET : gemini@geminix.in-berlin.de XBillstedter Pfad 17 b UUCP : ...!unido!fub!geminix.in-berlin.de!gemini X1000 Berlin 20 XGermany X*/ X X#if !defined (M_I286) X#ident "@(#)space.c 2.09" X#endif X X#if defined (XENIX) X#include "fas.h" X#else X#include <sys/fas.h> X#endif X X/* This is the number of devices to be handled by this driver. X You may define up to 16 devices. If this number is changed X the arrays below must be filled in accordingly. X*/ X#define NUM_PHYSICAL_UNITS 2 X X#if NUM_PHYSICAL_UNITS > MAX_UNITS X#undef NUM_PHYSICAL_UNITS X#define NUM_PHYSICAL_UNITS MAX_UNITS X#endif X X/* let the driver know the number of devices */ Xuint fas_physical_units = NUM_PHYSICAL_UNITS; X X/* array of base port addresses X If you deliberately want to force off the FIFOs of a UART you have X to "or" the NO_FIFO macro to its base port address. This is useful X for mouse devices where you need immediate response to the mouse X movement. X*/ Xulong fas_port [NUM_PHYSICAL_UNITS] = X{ X 0x3f8, 0x2f8 X}; X X/* array of interrupt vectors */ Xuint fas_vec [NUM_PHYSICAL_UNITS] = X{ X 0x4, 0x3 X}; X X/* initialization sequence for serial card X This array contains pairs of values of the form: X X portaddress, value, X : X : X portaddress, value, X 0 X X For every line `value' will be written to `portaddress'. If X `value' is replaced with the macro `READ_PORT' then a value X is read from `portaddress' instead. The value itself will be X discarded. Therefore, this makes only sense if the read access X to the port has a side effect like setting or resetting X certain flags. X X NOTE: This array *must* be terminated with a value of 0 X in the portaddress column! X*/ Xuint fas_init_seq [] = X{ X 0 X}; X X/* initial modem control port info X This value is ored into the modem control value for each UART. This is X normaly used to force out2 which is used to enable the interrupts of X the standard com1 and com2 ports. Several brands of cards have modes X that allow them to work in compatible mode like com1 and com2 or as a X shared interrupts card. One of these cards is the AST 4-port card. When X this card is used in shared interrupts mode out2 must _not_ be set. X X Note: This is one of the major trouble-spots with shared interrupts X cards. Check your manual. X*/ Xuint fas_mcb [NUM_PHYSICAL_UNITS] = X{ X MC_SET_OUT2, MC_SET_OUT2 X}; X X/* array of modem control flags X You can choose which signals to use for modem control. See fas.h X for possible names and values. Whether or not modem control is X used is determined by the minor device number at open time. X*/ Xulong fas_modem [NUM_PHYSICAL_UNITS] = X{ X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD X}; X X/* array of hardware flow control flags X You can choose which signals to use for hardware handshake. See fas.h X for possible names and values. Whether or not hardware handshake is X used is determined by the minor device number at open time and by the X RTSFLOW/CTSFLOW termio(7) flags. X*/ Xulong fas_flow [NUM_PHYSICAL_UNITS] = X{ X HI_RTS | HO_CTS_ON_DSR | HX_RTS, X HI_RTS | HO_CTS_ON_DSR | HX_RTS X}; X X/* array of control register addresses X There are serial boards available that have all serial ports X multiplexed to one address location in order to save I/O address X space (Bell Tech HUB-6 card etc.). This multiplexing is controlled X by a special register that needs to be written to before the actual X port registers can be accessed. This array contains the addresses X of these special registers. X Enter the addresses on a per unit base. An address of zero X disables this feature. X*/ Xuint fas_ctl_port [NUM_PHYSICAL_UNITS] = X{ X 0, 0 X}; X X/* array of control register values X These values are written to the corresponding control register X before the first access to the actual port registers. If not only X entire UART chips (blocks of 8 contiguous addresses) but even the X single registers of the UART chips need to be multiplexed to one X address you have to "or" a bit mask (shifted 8 times to the left) X to the control register value. This mask determines at which bit X locations the UART chip register number is "xored" into the control X register value at runtime. This implies that you can also use X negative logic by setting the bits in the control register value X to 1 at the locations corresponding to the bit mask. X*/ Xuint fas_ctl_val [NUM_PHYSICAL_UNITS] = X{ X 0, 0 X}; X X/* additional configurations for shared interrupts boards X If you have a shared interrupts board, you may have to acknowledge X interrupts by writing to a special register. The following arrays X contain the special register addresses and the corresponding values X that are written to them in response to an interrupt. X*/ X X/* array of int ack register addresses X These registers are written to every time after all interrupt X sources in all of the UARTs that are tied to the corresponding X interrupt vector have been cleared. X Enter the addresses on a per vector base. An address of zero X disables this feature. X*/ Xuint fas_int_ack_port [NUM_INT_VECTORS] = X{ X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0 X}; X X/* array of int ack values X These values are written to the corresponding int ack register X in response to an interrupt. X*/ Xuint fas_int_ack [NUM_INT_VECTORS] = X{ X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0 X}; X X/* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE. X ============================================ X*/ X X/* array of structures to hold all info for a physical minor device */ Xstruct fas_info fas_info [NUM_PHYSICAL_UNITS]; X X/* array of ttys for logical minor devices */ Xstruct tty fas_tty [NUM_PHYSICAL_UNITS * 2]; X X/* array of pointers to fas_info structures X this prevents time consuming multiplications for index calculation X*/ Xstruct fas_info *fas_info_ptr [NUM_PHYSICAL_UNITS]; X X/* array of pointers to fas_tty structures X this prevents time consuming multiplications for index calculation X*/ Xstruct tty *fas_tty_ptr [NUM_PHYSICAL_UNITS * 2]; SHAR_EOF true || echo 'restore of space-c1-2 failed' rm -f _shar_wnt_.tmp fi # ============= space-c1-3 ============== if test -f 'space-c1-3' -a X"$1" != X"-c"; then echo 'x - skipping space-c1-3 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting space-c1-3 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'space-c1-3' && X/* Async device configuration file for the FAS async driver. */ X X/* This version is for the standard COM1 and COM2 and additional COM3 X ports. X*/ X X/* FAS was developed by XUwe Doering INET : gemini@geminix.in-berlin.de XBillstedter Pfad 17 b UUCP : ...!unido!fub!geminix.in-berlin.de!gemini X1000 Berlin 20 XGermany X*/ X X#if !defined (M_I286) X#ident "@(#)space.c 2.09" X#endif X X#if defined (XENIX) X#include "fas.h" X#else X#include <sys/fas.h> X#endif X X/* This is the number of devices to be handled by this driver. X You may define up to 16 devices. If this number is changed X the arrays below must be filled in accordingly. X*/ X#define NUM_PHYSICAL_UNITS 3 X X#if NUM_PHYSICAL_UNITS > MAX_UNITS X#undef NUM_PHYSICAL_UNITS X#define NUM_PHYSICAL_UNITS MAX_UNITS X#endif X X/* let the driver know the number of devices */ Xuint fas_physical_units = NUM_PHYSICAL_UNITS; X X/* array of base port addresses X If you deliberately want to force off the FIFOs of a UART you have X to "or" the NO_FIFO macro to its base port address. This is useful X for mouse devices where you need immediate response to the mouse X movement. X*/ Xulong fas_port [NUM_PHYSICAL_UNITS] = X{ X 0x3f8, 0x2f8, 0x3e8 X}; X X/* array of interrupt vectors */ Xuint fas_vec [NUM_PHYSICAL_UNITS] = X{ X 0x4, 0x3, 0x9 X}; X X/* initialization sequence for serial card X This array contains pairs of values of the form: X X portaddress, value, X : X : X portaddress, value, X 0 X X For every line `value' will be written to `portaddress'. If X `value' is replaced with the macro `READ_PORT' then a value X is read from `portaddress' instead. The value itself will be X discarded. Therefore, this makes only sense if the read access X to the port has a side effect like setting or resetting X certain flags. X X NOTE: This array *must* be terminated with a value of 0 X in the portaddress column! X*/ Xuint fas_init_seq [] = X{ X 0 X}; X X/* initial modem control port info X This value is ored into the modem control value for each UART. This is X normaly used to force out2 which is used to enable the interrupts of X the standard com1 and com2 ports. Several brands of cards have modes X that allow them to work in compatible mode like com1 and com2 or as a X shared interrupts card. One of these cards is the AST 4-port card. When X this card is used in shared interrupts mode out2 must _not_ be set. X X Note: This is one of the major trouble-spots with shared interrupts X cards. Check your manual. X*/ Xuint fas_mcb [NUM_PHYSICAL_UNITS] = X{ X MC_SET_OUT2, MC_SET_OUT2, MC_SET_OUT2 X}; X X/* array of modem control flags X You can choose which signals to use for modem control. See fas.h X for possible names and values. Whether or not modem control is X used is determined by the minor device number at open time. X*/ Xulong fas_modem [NUM_PHYSICAL_UNITS] = X{ X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD X}; X X/* array of hardware flow control flags X You can choose which signals to use for hardware handshake. See fas.h X for possible names and values. Whether or not hardware handshake is X used is determined by the minor device number at open time and by the X RTSFLOW/CTSFLOW termio(7) flags. X*/ Xulong fas_flow [NUM_PHYSICAL_UNITS] = X{ X HI_RTS | HO_CTS_ON_DSR | HX_RTS, X HI_RTS | HO_CTS_ON_DSR | HX_RTS, X HI_RTS | HO_CTS_ON_DSR | HX_RTS X}; X X/* array of control register addresses X There are serial boards available that have all serial ports X multiplexed to one address location in order to save I/O address X space (Bell Tech HUB-6 card etc.). This multiplexing is controlled X by a special register that needs to be written to before the actual X port registers can be accessed. This array contains the addresses X of these special registers. X Enter the addresses on a per unit base. An address of zero X disables this feature. X*/ Xuint fas_ctl_port [NUM_PHYSICAL_UNITS] = X{ X 0, 0, 0 X}; X X/* array of control register values X These values are written to the corresponding control register X before the first access to the actual port registers. If not only X entire UART chips (blocks of 8 contiguous addresses) but even the X single registers of the UART chips need to be multiplexed to one X address you have to "or" a bit mask (shifted 8 times to the left) X to the control register value. This mask determines at which bit X locations the UART chip register number is "xored" into the control X register value at runtime. This implies that you can also use X negative logic by setting the bits in the control register value X to 1 at the locations corresponding to the bit mask. X*/ Xuint fas_ctl_val [NUM_PHYSICAL_UNITS] = X{ X 0, 0, 0 X}; X X/* additional configurations for shared interrupts boards X If you have a shared interrupts board, you may have to acknowledge X interrupts by writing to a special register. The following arrays X contain the special register addresses and the corresponding values X that are written to them in response to an interrupt. X*/ X X/* array of int ack register addresses X These registers are written to every time after all interrupt X sources in all of the UARTs that are tied to the corresponding X interrupt vector have been cleared. X Enter the addresses on a per vector base. An address of zero X disables this feature. X*/ Xuint fas_int_ack_port [NUM_INT_VECTORS] = X{ X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0 X}; X X/* array of int ack values X These values are written to the corresponding int ack register X in response to an interrupt. X*/ Xuint fas_int_ack [NUM_INT_VECTORS] = X{ X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0 X}; X X/* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE. X ============================================ X*/ X X/* array of structures to hold all info for a physical minor device */ Xstruct fas_info fas_info [NUM_PHYSICAL_UNITS]; X X/* array of ttys for logical minor devices */ Xstruct tty fas_tty [NUM_PHYSICAL_UNITS * 2]; X X/* array of pointers to fas_info structures X this prevents time consuming multiplications for index calculation X*/ Xstruct fas_info *fas_info_ptr [NUM_PHYSICAL_UNITS]; X X/* array of pointers to fas_tty structures X this prevents time consuming multiplications for index calculation X*/ Xstruct tty *fas_tty_ptr [NUM_PHYSICAL_UNITS * 2]; SHAR_EOF true || echo 'restore of space-c1-3 failed' rm -f _shar_wnt_.tmp fi # ============= space-hub6 ============== if test -f 'space-hub6' -a X"$1" != X"-c"; then echo 'x - skipping space-hub6 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting space-hub6 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'space-hub6' && X/* Async device configuration file for the FAS async driver. */ X X/* This version is for the Bell Tech HUB-6 card. X*/ X X/* FAS was developed by XUwe Doering INET : gemini@geminix.in-berlin.de XBillstedter Pfad 17 b UUCP : ...!unido!fub!geminix.in-berlin.de!gemini X1000 Berlin 20 XGermany X*/ X X#if !defined (M_I286) X#ident "@(#)space.c 2.09" X#endif X X#if defined (XENIX) X#include "fas.h" X#else X#include <sys/fas.h> X#endif X X/* This is the number of devices to be handled by this driver. X You may define up to 16 devices. If this number is changed X the arrays below must be filled in accordingly. X*/ X#define NUM_PHYSICAL_UNITS 6 X X#if NUM_PHYSICAL_UNITS > MAX_UNITS X#undef NUM_PHYSICAL_UNITS X#define NUM_PHYSICAL_UNITS MAX_UNITS X#endif X X/* let the driver know the number of devices */ Xuint fas_physical_units = NUM_PHYSICAL_UNITS; X X/* array of base port addresses X If you deliberately want to force off the FIFOs of a UART you have X to "or" the NO_FIFO macro to its base port address. This is useful X for mouse devices where you need immediate response to the mouse X movement. X*/ Xulong fas_port [NUM_PHYSICAL_UNITS] = X{ X 0x303, 0x303, 0x303, 0x303, 0x303, 0x303 X}; X X/* array of interrupt vectors */ Xuint fas_vec [NUM_PHYSICAL_UNITS] = X{ X 0x3, 0x3, 0x3, 0x3, 0x3, 0x3 X}; X X/* initialization sequence for serial card X This array contains pairs of values of the form: X X portaddress, value, X : X : X portaddress, value, X 0 X X For every line `value' will be written to `portaddress'. If X `value' is replaced with the macro `READ_PORT' then a value X is read from `portaddress' instead. The value itself will be X discarded. Therefore, this makes only sense if the read access X to the port has a side effect like setting or resetting X certain flags. X X NOTE: This array *must* be terminated with a value of 0 X in the portaddress column! X*/ Xuint fas_init_seq [] = X{ X 0 X}; X X/* initial modem control port info X This value is ored into the modem control value for each UART. This is X normaly used to force out2 which is used to enable the interrupts of X the standard com1 and com2 ports. Several brands of cards have modes X that allow them to work in compatible mode like com1 and com2 or as a X shared interrupts card. One of these cards is the AST 4-port card. When X this card is used in shared interrupts mode out2 must _not_ be set. X X Note: This is one of the major trouble-spots with shared interrupts X cards. Check your manual. X*/ Xuint fas_mcb [NUM_PHYSICAL_UNITS] = X{ X 0, 0, 0, 0, 0, 0 X}; X X/* array of modem control flags X You can choose which signals to use for modem control. See fas.h X for possible names and values. Whether or not modem control is X used is determined by the minor device number at open time. X*/ Xulong fas_modem [NUM_PHYSICAL_UNITS] = X{ X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD, X EO_DTR | EI_DTR | CA_DCD X}; X X/* array of hardware flow control flags X You can choose which signals to use for hardware handshake. See fas.h X for possible names and values. Whether or not hardware handshake is X used is determined by the minor device number at open time and by the X RTSFLOW/CTSFLOW termio(7) flags. X*/ Xulong fas_flow [NUM_PHYSICAL_UNITS] = X{ X HI_RTS | HO_CTS | HX_RTS, X HI_RTS | HO_CTS | HX_RTS, X HI_RTS | HO_CTS | HX_RTS, X HI_RTS | HO_CTS | HX_RTS, X HI_RTS | HO_CTS | HX_RTS, X HI_RTS | HO_CTS | HX_RTS X}; X X/* array of control register addresses X There are serial boards available that have all serial ports X multiplexed to one address location in order to save I/O address X space (Bell Tech HUB-6 card etc.). This multiplexing is controlled X by a special register that needs to be written to before the actual X port registers can be accessed. This array contains the addresses X of these special registers. X Enter the addresses on a per unit base. An address of zero X disables this feature. X*/ Xuint fas_ctl_port [NUM_PHYSICAL_UNITS] = X{ X 0x302, 0x302, 0x302, 0x302, 0x302, 0x302 X}; X X/* array of control register values X These values are written to the corresponding control register X before the first access to the actual port registers. If not only X entire UART chips (blocks of 8 contiguous addresses) but even the X single registers of the UART chips need to be multiplexed to one X address you have to "or" a bit mask (shifted 8 times to the left) X to the control register value. This mask determines at which bit X locations the UART chip register number is "xored" into the control X register value at runtime. This implies that you can also use X negative logic by setting the bits in the control register value X to 1 at the locations corresponding to the bit mask. X*/ Xuint fas_ctl_val [NUM_PHYSICAL_UNITS] = X{ X 0x700, 0x708, 0x710, 0x718, 0x720, 0x728 X}; X X/* additional configurations for shared interrupts boards X If you have a shared interrupts board, you may have to acknowledge X interrupts by writing to a special register. The following arrays X contain the special register addresses and the corresponding values X that are written to them in response to an interrupt. X*/ X X/* array of int ack register addresses X These registers are written to every time after all interrupt X sources in all of the UARTs that are tied to the corresponding X interrupt vector have been cleared. X Enter the addresses on a per vector base. An address of zero X disables this feature. X*/ Xuint fas_int_ack_port [NUM_INT_VECTORS] = X{ X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0 X}; X X/* array of int ack values X These values are written to the corresponding int ack register X in response to an interrupt. X*/ Xuint fas_int_ack [NUM_INT_VECTORS] = X{ X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0, X 0, 0, 0, 0 X}; X X/* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE. X ============================================ X*/ X X/* array of structures to hold all info for a physical minor device */ Xstruct fas_info fas_info [NUM_PHYSICAL_UNITS]; X X/* array of ttys for logical minor devices */ Xstruct tty fas_tty [NUM_PHYSICAL_UNITS * 2]; X X/* array of pointers to fas_info structures X this prevents time consuming multiplications for index calculation X*/ Xstruct fas_info *fas_info_ptr [NUM_PHYSICAL_UNITS]; X X/* array of pointers to fas_tty structures X this prevents time consuming multiplications for index calculation X*/ Xstruct tty *fas_tty_ptr [NUM_PHYSICAL_UNITS * 2]; SHAR_EOF true || echo 'restore of space-hub6 failed' rm -f _shar_wnt_.tmp fi # ============= update_desc ============== if test -f 'update_desc' -a X"$1" != X"-c"; then echo 'x - skipping update_desc (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting update_desc (Text)' sed 's/^X//' << 'SHAR_EOF' > 'update_desc' && X# Update the kernel description file X Xgrep '^fas[ ]' $1 > /dev/null 2>&1 Xif [ $? -eq 1 ] Xthen X echo 'fas - - io - FAS Serial I/O Driver' >> $1 Xfi SHAR_EOF true || echo 'restore of update_desc failed' rm -f _shar_wnt_.tmp fi rm -f _shar_seq_.tmp echo You have unpacked the last part exit 0 -- Uwe Doering | INET : gemini@geminix.in-berlin.de Berlin |---------------------------------------------------------------- Germany | UUCP : ...!unido!fub!geminix.in-berlin.de!gemini