

                       Technical Rambling about SIO2K

The SIO2K set of drivers have some interesting new techniques and
implementations.

Block input and output.
     If the UART is a FIFOed device, the interrupt service routines (there
     are several) always use block input and output instructions to read
     and write characters.  During high communications activity, this means
     the 16550 interrupt routine is 5 to 10 times faster (possibly more)
     than previous implementations.  UARTs with larger FIFOs will execute
     even faster.  Now boys and girls, it is the interrupt service routines
     that are faster.  Nothing on Earth can make your modem go faster than
     it is capable of.  However, faster interrupt service routines means
     less processor overhead.

Automatic FIFO sizing.
     The SIO2K drivers now support 16650, 16550A, 16750, 16850 and 16950
     uarts.  However, knowing the chip type does not necessarily mean the
     FIFO size is know.  For example, the 16654 is the equivalent of four
     (or more) 16650A UARTS on a single chip.  The normal 16650 UARTs have
     a 32 byte FIFO, but the UARTS on the 16654 have 64 byte FIFOs.  Only
     probing will determine this.

     The first time a UART is touched by an application the SIO2K drivers
     automatically probe the size of the FIFO and the found size is used. 
     Note that a UART with no FIFOs can be thought of as having a FIFO size
     of 1 byte.  My thanks to Sam Detweiler, of IBM, for the idea of
     probing for FIFO size.

Automatic Crystal Frequency.
     Most UARTs are capable of bit rates to 921600bps or more. 
     However, on most serial devices, the bit rate is limited to
     115200bps by the crystal oscillator attached to the UART. Many
     boards, like those from Lava, offer bit rates greater than 115200
     by using faster crystal oscillator.  The down side is one must
     tell the driver to use a bit rate of 28800 to really get a bit
     rate of 115200.

     The first time a UART is touched by an app, the SIO2K drivers probe
     the UART to determine if it is using a standard crystal oscillator or
     not.  If the frequency is not standard, then the SIO2K drivers
     automatically adjust so that a request of 115200bps yields an actual
     bit rate of 115200bps.  In addition, the maximum bit rate is adjusted
     and reported to applications that request the maximum bit rate. 
     Boards like the Blue Heat from CTI use a 12x crystal and its top bit
     rate is 1382.4kbps.


Minimum touch during boot.
     The SIO2K drivers do not touch the UART hardware during boot. This was
     very difficult to do, while maintaining a compatible OS/2 serial
     driver. The "no touch" practically eliminates the possibility of traps
     occurring during the boot process when they are difficult to deal
     with.  This does mean that a lot of processing will occur the first
     time a port is opened.

Coming attractions.
     The separation of the standard OS/2 driver into two drivers (sio2k.sys
     and uart.sys) amounts to a virtualization of the OS/2 serial driver. 
     This gives great flexibility in redirecting the serial data to
     destinations other than a serial device.

     The first major addition planed for the SIO2K driver set is remote
     modems.  Using this feature, OS/2 systems will be able to access
     modems on another OS/2 system across a network.  As planed now, the
     network can be either a Local Area Network, or Internet/Intranet.

     One will be able to set up an OS/2 system to act as a modem pool for
     other OS/2 systems, and it will be simple.

