[comp.unix.microport] Solution found to using second PIC interrupts

mike@kc5n.UUCP (Mike Barnes) (06/05/89)

I finally figured out how to use the additional interrupts on the
second PIC in conjunction with Jim Murray's asy driver under Sys
V/AT 2.3. The solution is useful for anyone planning on adding a
device driver of any sort using the spare second-PIC interrupts.

The system as it comes from the factory has the spare interrupts masked
out. To change the mask you need to patch the table 'slavtbl'. This
table consists of a one byte mask for each of the 8 spl levels.
The default settings are:
	slavtbl[0]    [1]    [2]    [3]    [4]    [5]    [6]    [7]
	        1f     ff     ff     ff     7f     7f     7f     ff

The 'slavtbl' contains the interrupt masks for each spl() level. The
bit settings are:
	bit [0 = low order bit]		bit
	 0  Real time clock		 4  IRQ12 (spare)
	 1  IRQ9 (pc IRQ2)		 5  coprocessor
	 2  IRQ10 (spare)		 6  Fixed disk
	 3  IRQ11 (spare)		 7  IRQ15 (spare.. for third lp)

For example, to enable IRQ9 to be used for serial use, patch the system
by changing bit position 1 for spl levels 0,4,5,6 (i.e.
slavtbl[0],[4],[5],[6]) from one to zero [A '1' disables interrupts, a '0'
enables them]:
		patch /system5 -b +0 0x1d
		patch /system5 -b +4 0x7d
		patch /system5 -b +5 0x7d
		patch /system5 -b +6 0x7d

I now have no trouble using IRQ9 for a fourth serial line. Hope this
helps.
-------
Mike Barnes      San Antonio, Tx
{backbone}!killer!texbell!petro!kc5n!mike