home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.ibm.pc.hardware
- Path: sparky!uunet!utcsri!geac!itcyyz!jhs
- From: jhs@ipsa.reuter.com (Henri Schueler)
- Subject: IRQ8-15 (was IRQ2=trouble?)
- Message-ID: <1992Sep8.191232.7073@ipsa.reuter.com>
- Organization: H&h Software, Toronto, Ontario
- Date: Tue, 8 Sep 1992 19:12:32 GMT
- Lines: 57
-
- In a recent article steveq@swifty.dap.CSIRO.AU (Stephen Quigg) writes:
-
- > In the AT/386/486 etc, there is a second 8259A
- >interrupt controller, called a slave, while the first one is configured as
- >a master. The master handles IRQ0 through IRQ7 and the slave handles IRQ8
- >through IRQ15. Simple so far. Now; the IRQ_OUT from the master goes to the
- >processor, and the IRQ_OUT from the slave goes to the IRQ2 pin of the master.
- >(ie IRQ8 through IRQ15 is cascaded through IRQ2). When the master receives
- >an interrupt acknowledge for IRQ2, instead of putting an interrupt vector
- >on the bus, it tells the slave to output a vector.
-
- I am familiar with this, but I have a question about the relationship
- between the two PICs, specifically with respect to priority handling.
-
- In a single PIC situation (e.g. the XT), and with the normal IBM PC
- configuration of the PIC, the IRQs have a strict priority, and use
- the non-specific EOI to signal end-of-interrupt. Once the PIC has
- signaled an IRQ, it won't signal another interrupt of the same or
- lesser priority until that IRQ is 'ended'. (sorry for being boring).
-
- In the two PIC case, when the primary has received an interrupt
- request from the secondary (i.e. on IRQ2) and has signaled this to
- the CPU, what happens when the primary gets another request from the
- secondary before the interrupt has 'ended'? The primary must assume
- this interrupt is of higher priority (else why would the secondary
- signal it), so I assume the primary will signal the CPU.
-
- Can anyone comment if I am right in making this assumption?
-
- If no, then a device on IRQ15 (once it generates an interrupt) will be
- blocking a device on IRQ8-14. That doesn't sound right.
-
- If yes, then I see a potential problem with the DOS/BIOS software
- re-direction of IRQ9 to IRQ2. In my Phoenix BIOS, the secondary PIC
- is EOI'd, and then IRQ2 (INT 0Ah) is invoked. At this point the
- device that thinks it is hanging off IRQ2 goes merrily about its
- business and at some point EOI's the primary.
-
- The danger is this: another IRQ9 (=2) can be invoked, and if the ISR
- isn't re-entrant, then a mess might ensue. If so, then perhaps this
- is a reason for warning users to avoid the IRQ2 in at ISA bus.
-
- Of course if the ISR actually hangs off IRQ9 (i.e. INT 71h), then the
- ISR will be expected to send an EOI to both, and it can protect
- itself against being re-entered (assuming it wants to). (But checking
- mouse.com from Windows, I see that it favours INT 0A, not INT 71.)
-
- If the DOS/BIOS redirector at INT 71 were to invoke INT 0A, and send
- an EOI to the secondary *afterwards* then other problems might ensue
- (e.g. if the INT 0A handler were to wait as the keyboard handler does
- in a PAUSE situation), but overall it seems like a safer approach
- (then EOI'ing first).
-
- /jhs
-
- --
- J. Henri Schueler, H&h Software, Toronto +1 416 698 9075
-