home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / INFO / FAQS / OS2FAX2 / OSINITER.FAX < prev    next >
Encoding:
Text File  |  1994-08-13  |  12.9 KB  |  272 lines

  1.   OSINITER.FAX
  2.  
  3. INFORMATION REGARDING INTERRUPTS AND OS/2 2.0 IN AT BUS SYSTEMS
  4. ---------------------------------------------------------------
  5.  
  6.   INTERRUPT PROBLEMS ON AN ISA SYSTEM
  7.  
  8.   On an ISA system, having a shared interrupt-request line can cause problems.
  9.   ISA systems have what are called "edge triggered" interrupts whereas Micro
  10.   Channel and EISA systems use "level sensitive" interrupts.  "Edge triggered"
  11.   interrupts can only be sensed for a very short period of time.  If a second
  12.   interrupt arrives from another adapter while the first interrupt is still
  13.   being processed, the second interrupt will be lost.  In your computer system,
  14.   this situation can lead to various difficulties such as printers that do not
  15.   seem to print smoothly or reliably, or communications sessions where some
  16.   characters are getting lost.
  17.  
  18.   However, with single-tasking systems such as DOS, the two adapters that are
  19.   sharing the interrupt might never cause any real problems because they might
  20.   never be in use at the same time.  OS/2 2.0, however, presents a different
  21.   set of problems.  If you have multiple serial communications adapters, there
  22.   is a greater probability that you might try to use two or more of them at the
  23.   same time.  If some of them have previously been set up using shared
  24.   interrupts, problems can occur that probably didn't happen in DOS.
  25.  
  26.   OS/2 2.0 can detect that an interrupt line is shared and will not allow
  27.   simultaneous use.  Assume that COM1 and COM3 are sharing Interrupt Request
  28.   line 4 (IRQ4).  If you try to use both COM ports at the same time, the OS/2
  29.   operating system will not allow the second one to start.  A well-written OS/2
  30.   communications program will recognize that the port cannot be opened and an
  31.   error message will be displayed.  A DOS application, however, is unprepared
  32.   to respond to this unfamiliar situation.  It will probably suspend, waiting
  33.   for the port that will not open.
  34.  
  35.   Another potential source of trouble is having multiple hardware adapters that
  36.   are sharing the same I/O address.  The various hardware adapters in your
  37.   computer must have their own addresses.  Consider what might happen, for
  38.   example, if the commands that were meant for your printer were instead routed
  39.   to your disk drive.
  40.  
  41.   The solution for all of these problems is to ensure that all your hardware
  42.   adapters have their own unique I/O addresses and IRQ assignments.
  43.  
  44.  
  45.   COM3 OR COM4 SUPPORT ON AN ISA SYSTEM
  46.  
  47.   The original ISA machine (the IBM PC-AT) allowed for the definition of up to
  48.   four serial communication ports.  However, there has never been any hardware
  49.   architectural standard that defined the I/O port addresses or Interrupt
  50.   Request (IRQ) lines associated with communication ports 3 or 4.
  51.  
  52.   Over the years, a convention has developed that places the port addresses for
  53.   COM3 and COM4 at 03E8 and 02E8 respectively.  This is a generally accepted
  54.   convention, but not a standard.  Check the documentation and the settings of
  55.   the adapters in your system to verify your hardware environment.
  56.  
  57.   After you have checked and set the I/O and IRQ values on your COM ports or
  58.   internal modems, you must add this information to the communications
  59.   device-driver (COM.SYS) statement in the CONFIG.SYS file.
  60.  
  61.   You might also need to tell your communications application software where
  62.   the COM ports are.  ProComm software, for example, has a configuration screen
  63.   that enables you to specify these settings.  If the application, operating
  64.   system, and hardware are not in agreement, then the application will not run.
  65.  
  66.   OS/2 COM ports do not need to be defined in sequence.  It is acceptable to
  67.   have a COM4 without having a COM3.  DOS, however, might have difficulty if
  68.   there is a gap in the port definition.  To avoid confusion for DOS, you can
  69.   define COM ports that do not have any physical adapters attached in the
  70.   COM.SYS statement.  These substitute definitions will serve as placeholders.
  71.   COM1 and COM2 are assumed to have standard values and do not need to be
  72.   explicitly set up unless you want to set some non-standard values to
  73.   accommodate your particular configuration.
  74.  
  75.   To enable COM3 or COM4 on an ISA system, place the following in the
  76.   CONFIG.SYS file:
  77.  
  78.     DEVICE=X:\OS2\COM.SYS (n,a,i) (n,a,i)
  79.  
  80.   where
  81.  
  82.    X = the drive where OS/2 is installed
  83.    n = the COM port that you are attempting to access
  84.    a = communications port I/O address (03E8, 02E8, for example)
  85.    i = IRQ level, which is usually a jumper setting on the I/O adapter
  86.  
  87.   For example, to specify that COM3 is at address 03E8 on IRQ5 and that COM4 is
  88.   at address 02E8 on IRQ10, use the following statement (assuming that OS/2 is
  89.   installed on drive C):
  90.  
  91.           DEVICE=C:\OS2\COM.SYS (3,03E8,5) (4,02E8,10)
  92.  
  93.   The I/O address and IRQ level should be noted in the documentation that came
  94.   with your adapter.  Either or both might be fixed values or can be set to a
  95.   range of values via jumpers or switches.  In some cases you might find that
  96.   the values are fixed or that the range of settings available to you is
  97.   insufficient to avoid the sharing conflict.  In that case, you must purchase
  98.   a different, more versatile adapter or accept that you cannot use both
  99.   adapters at the same time.
  100.  
  101.  
  102.   SETTING THE INTERRUPT REQUEST (IRQ) LEVEL ON AN ISA SYSTEM
  103.  
  104.   The following information will help you determine what IRQ settings you can
  105.   use for COM3 or COM4 port adapters to avoid shared interrupts.
  106.  
  107.   On an ISA machine there are a total of 15 IRQ levels available.  Many of
  108.   these are already being used.  Most are already in use because they are the
  109.   the standard settings for the more common devices.  These standard settings
  110.   are as follows:
  111.  
  112.   IRQ LEVEL      DEVICE ASSOCIATED
  113.  
  114.   0              System Timer
  115.  
  116.   1              Keyboard
  117.  
  118.   2              Secondary Interrupt Controller  (see note)
  119.  
  120.   3              COM2 (Serial Communications Port 2)
  121.  
  122.   4              COM1 (Serial Communications Port 1)
  123.  
  124.   5              LPT2 (Parallel Port 2)
  125.  
  126.   6              Diskette
  127.  
  128.   7              LPT1 (Parallel Port 1)
  129.  
  130.   8              Realtime Clock
  131.  
  132.   9              open
  133.  
  134.   10             open
  135.  
  136.   11             open
  137.  
  138.   12             open
  139.  
  140.   13             Math Coprocessor
  141.  
  142.   14             Hard Disk
  143.  
  144.   15             open
  145.  
  146.   NOTE:  On the IBM-AT (ISA bus), the IRQ9 pin is identical with the IRQ2 pin
  147.          on the original IBM-PC.  If you have an older, 8-bit adapter whose
  148.          documentation states that it uses IRQ2, be aware that this will
  149.          actually be interpreted as IRQ9 when plugged into the 16-bit ISA bus.
  150.  
  151.   The IRQ levels shown as "open" have no established, standardized use.  When
  152.   setting the IRQ values on your COM3 or COM4 ports, you are likely to find
  153.   these levels available to use without conflict with some other adapter.
  154.   Furthermore, if you don't have two parallel ports installed, IRQ5 might be
  155.   usable for some other purpose, such as COM3 or COM4.  Be cautious about doing
  156.   this because it might cause a problem later if you decide to install a second
  157.   parallel port.  In addition, some other non-standard device might already be
  158.   using IRQ5.
  159.  
  160.   When trying to manage the IRQ levels of your various hardware adapters to
  161.   avoid conflicts, you may find that your 8-bit adapters cause problems.
  162.   Except for IRQ9, only 16-bit adapters are configurable to use IRQ levels
  163.   higher than 7.  A glance at the IRQ table will also show that the
  164.   low-numbered IRQ lines already have some standard function assigned.  It
  165.  
  166.   might be that your only alternative for avoiding some IRQ conflicts is to
  167.   purchase a more versatile 16-bit adapter.
  168.  
  169.   If you have non-standard 8-bit adapters, be especially careful of interrupt
  170.   conflicts.  For example, the SoundBlaster adapter is configured at the
  171.   factory to use IRQ7.  IRQ7, however, is the standard assignment for LPT1, the
  172.   first printer port.  This conflict might not be apparent with DOS because DOS
  173.   printing typically does not use the interrupt line.  OS/2 2.0, however,
  174.   requires it, and the hidden conflict can become the source of printing
  175.   problems.  It is also fairly common to discover that the interrupt feature on
  176.   your parallel port adapter does not work.  In DOS, this might not have any
  177.   effect.  In OS/2 2.0, however, your printer might be very erratic or not work
  178.   at all.
  179.  
  180.   Under OS/2 interrupts can not be shared.  Results are unpredictable if
  181.   interrupts are shared.  Sharing interrupts is not a problem under DOS.  It is
  182.   possible for devices that are sharing interrupts to work perfectly under DOS
  183.   and have problems under OS/2.
  184.  
  185.   (Note:  On the IBM-AT (ISA bus) the IRQ9 pin is identical with the IRQ22 pin
  186.   on the original IBM-PC.  If you have an older, 8-bit adapter whose
  187.   documentation states that it uses IRQ2 then be aware that this will actually
  188.   be seen as IRQ9 when plugged into the 16-bit ISA bus.)
  189.  
  190.   If multiple hardware adapters of any kind (not just communications) are using
  191.   the same IRQ level then the effect on your computer will be unpredictable.
  192.   However, with single tasking systems like DOS, the two adapters which are
  193.   sharing the interrupt may never cause any problems since they may never be in
  194.   use at the same time.
  195.  
  196.   OS/2, however, presents a different set of problems.  If we have two, three or
  197.   four adapters, the probability is now high that they are used at the same
  198.   time.  If some of adapters had been set up using shared interrupts then the
  199.   scene is set for mysterious things to occur in OS/2.
  200.  
  201.   OS/2 can, however, detect that an interrupt line is shared and will disallow
  202.   the simultaneous use.  Assume that COM1 and COM3 were sharing IRQ4 (a fairly
  203.   common real situation).  If we tried to use both COM ports at the same time
  204.   OS/2 would refuse to allow the second one to start.  A well written OS/2
  205.   communications program would see and report the error from OS/2 that the port
  206.   could not be opened.  A DOS application, however, will likely be unprepared to
  207.   respond to this strange situation and it may simply hang there waiting forever
  208.   for the port that will never open.
  209.  
  210.   The solution for all of this is to make sure that all of your hardware
  211.   adapters have their own unique I/O addresses and IRQ assignments.
  212.   Unfortunately, on an ISA machine, OS/2 has no way to query the computer to
  213.   find out what these settings are.  Therefore, after checking and setting the
  214.   adapters according to the instruction manuals you must also tell OS/2 what
  215.   you've done by placing explicit information into the CONFIG.SYS file.
  216.  
  217. TO SUMMERIZE
  218. ------------
  219.  
  220.         *) Even though there is some flexibility for Printer &
  221.            Comm. port assignment try to stick to the standard
  222.            assignment as shown in IRQ table at the beginning
  223.            of document.
  224.  
  225.         *) Available interrupts, in order of priority, are:
  226.            IRQ10, IRQ11, IRQ12, IRQ15, IRQ3 (if not used
  227.            for COM2), and IRQ5 (if not used for LPT2).
  228.  
  229.         *) Addresses and interrupts can be assigned in OS2
  230.            to comm ports as described in info apar II06069.
  231.            Standard assigment is as follows:
  232.                 COM1 - 3F8 - IRQ 4 (default)
  233.                 COM2 - 2F8 - IRQ 3 (default)
  234.                 COM3 - 3E8
  235.                 COM4 - 2E8
  236.            There is no OS/2 default setting for COM3 and
  237.            COM4. It must be specified by the device=com.sys
  238.            statement in config.sys.
  239.  
  240.         *) Printer port addresses and IRQ levels are hardcoded
  241.            in OS/2 as follows:
  242.                 3BC and 378     ==> IRQ7 (LPT1)
  243.                 278             ==> IRQ5 (LPT2)
  244.            Unlike the the comm ports, where the addresses
  245.            and the interrupts can be modified by the
  246.            device=com.sys in config.sys, the printer port
  247.            addresses and IRQ shown above are fixed.
  248.            OS2 assigns LPT1 to the highest printer port address
  249.            being used. The printer address is specified in the
  250.            printer adapter board.
  251.            With OS/2 you can not use both addresses 3BC and 378
  252.            as printer port addresses. Both LPTs would be sharing
  253.            IRQ7.
  254.            Unlike DOS, OS/2 uses interrupts for printing.
  255.            The interrupt is triggered by a signal line from
  256.            the printer, ACK. If the IRQs are not configured
  257.            correctly, or the printer cable is missing the ACK
  258.            line the printer may work under DOS and
  259.            have problems under OS/2.
  260.  
  261.            An example of address and interrupt assignment is
  262.            follows:
  263.                    COM1 - 3F8,IRQ4
  264.                    COM2 - 2F8,IRQ3
  265.                    COM3 - 3E8,IRQ5 (IRQ5 not being used by lpt2)
  266.                    COM4 - 2E8,IRQ10
  267.  
  268.                    LPT1 - 378,IRQ7
  269.  
  270.         *) If interrupt devices are occasionally losing data,
  271.            try moving to a higher priority unused interrupt.
  272.