Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Dec 1994 18:21:13 +1000
From:      Stephen McKay <syssgm@devetir.qld.gov.au>
To:        hackers@freebsd.org
Cc:        syssgm@devetir.qld.gov.au
Subject:   Re: shared irq on serial ports
Message-ID:  <199412190821.SAA22128@orion.devetir.qld.gov.au>

next in thread | raw e-mail | index | archive | help
J Wunsch <julia!j@uriah.sax.de> writes:

>Yes, IBM save allot of money in the design of the COM port, probably
>around $ 0.02 or so -- they omitted a single gate to make the
>INTERRUPT ENABLE line go active only when an interrupt is actually
>pending.  With the current design, if you have two UART-boards driving
>the same IRQ line (on an ISA bus), both do drive it actively all the
>time (when their interrupts are enabled).  When one of both has an
>interrupt condition, it attempts to drive the line high, and since
>it's very unlikely that the other one also does have an interrupt
>pending just now, it will continue to hold the line low, causing a
>somewhat unpredictable behaviour. :-/

Certainly you can't enable the IRQ lines of both ports at once, but the
critically IRQ deprived can possibly get some use out of their shared ports.

Assuming you have a high speed application for one port and a low speed
application (or output only application) for the other, you can run one port
via interrupts and one port via polling.  When the low speed port is open for
reading, or output is queued, polling would be enabled, and disabled otherwise.
If you keep your system clock at 100Hz and use a 16550, that gives you almost
1600 cps, which means you could comfortably poll 9600bps input.  Fine for a
mouse, printer or low speed modem.  A 16450 would yield a miserable 100 cps
upper limit on input unless the tick rate was increased, though it might be
useful for a printer.

I don't know how much cpu you would lose with all this, and it is an awful
lot of pissing about for such a small gain.  Check out the cost of a 4 or 8
port serial card.  I've never regretted mine.

Stephen.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199412190821.SAA22128>