[comp.unix.xenix] Using serial devices under SCO Xenix above COM 2

barton@holston.UUCP (barton) (09/05/89)

Recently the excerpt below was posted by Ross Oliver at SCO.

>However, if you can set these boards to use other interrupts, then you
>can use them alongside existing COM1 and COM2 devices.  To do this, you
>will have to modify the /usr/sys/conf/master file to tell the serial
>driver to handle the additional interrupts.  Modify the "vec3" and "vec4"
>columns for the "sio" entry, then rebuild your kernel.

>Ross Oliver
>Technical Support
>The Santa Cruz Operation, Inc.


My question is:
How do the entries in the vec3 and vec4 
columns relate to the COM ports and what values should
be placed where? Since vec1 and vec2 are 3 and 4 respectively,
am I correct in assuming that vec1 is for COM2 which is
normally IRQ 3 and that vec2 is for COM1 which is normally
IRQ 4 ??

If this is true, then are the vec3 and 4 columns also reversed
i.e. COM4 and COM3 respectively?

I recently tried this with an internal modem that supports
COM1 thru COM4 and IRQ2 thru IRQ5 to no avail.

Does anyone have any suggestions or better, definate answers?
-- 
Barton A. Fisk          | UUCP: {attctc,texbell,vector}!warble!holston!barton
PO Box 1781             | (PSEUDO) DOMAIN: barton@holston.UUCP     
Lake Charles, La. 70602 | ----------------------------------------
318-439-5984            | +++++ "Hal, open the pod bay doors" --- Dave

blume@netmbx.UUCP (Heiko Blume) (09/06/89)

In article <448@holston.UUCP> barton@holston.UUCP (barton) writes:
>Recently the excerpt below was posted by Ross Oliver at SCO.
>
>>However, if you can set these boards to use other interrupts, then you
>>can use them alongside existing COM1 and COM2 devices.  To do this, you
>>will have to modify the /usr/sys/conf/master file to tell the serial
>>driver to handle the additional interrupts.  Modify the "vec3" and "vec4"
>>columns for the "sio" entry, then rebuild your kernel.
>
>My question is:
>How do the entries in the vec3 and vec4 
>columns relate to the COM ports and what values should
>be placed where? Since vec1 and vec2 are 3 and 4 respectively,
>am I correct in assuming that vec1 is for COM2 which is
>normally IRQ 3 and that vec2 is for COM1 which is normally
>IRQ 4 ??

You have to set vec1 and vec2 (and vec3 &4) according to your entries 
in the sioconf.c-file. The order of the interrups doesn't matter in
the 'master'-file. They just have to be mentioned.

I recently wrote an article about installing ports 3 & 4, but
it didn't reach the net. 
Here it is again, I hope this time it'll get out..


You can also take a simple-minded 4port card without common interrupt
polling register.

just 'follow these steps:'  (SCO-slang)

1. Configuring the hardware

   You have to configure 4 ports to obtain:
      COM1: Adress x3f8   IRQ 4
      COM2: Adress x2f8   IRQ 3
      COM3: Adress x3e8   IRQ 5  (you just lost your lpt3 :-(  )
      COM4: Adress x2e8   IRQ 9 (PC-AT) = IRQ 2 (PC-XT)

   I have to mention that IRQ2 and IRQ9 are one and the same
   pin on the slots of your PC (pin B4). That was IRQ2
   on a PC-XT. The PC-AT doesn't have the IRQ2 any more, 
   since it has a slave PIC (Peripheral Interrupt Controller)
   connected to the old IRQ2. The 8-Bit AT slots now have IRQ9
   which is Interrupt 1 on the slave PIC.

   Back to configuring the 4 ports:
   COM1 and COM2 Ports are standard - no problem.
   If you take another 2port standard serial card, you 
   have to jumper or switch the 'alternate' adresses
   x3e8 for the 1st port (which will become COM3) and
   x2e8 for the 2nd port of this card (becomes COM4).
   If you got switches for IRQ5 and IRQ2/9 you're
   lucky - just jumper them.
   If you hav'nt you have to solder a wire from the card-edge
   connector B23 (IRQ5) to the open jumper/switch for the
   connection of IRQ4 to port1 interrupt output (solder it
   to the port-side).
   Solder a second wire from the slot connector B4 (that's
   on the solder-side of the pcb, 4th strip from the left)
   and connect it to the interrupt output of the 2nd port 
   (this was originally jumpered to IRQ3).
   

    --------------             --------------
    |   port 1   |             |   port 2   |
    | 8230/16450 |             | 8230/16450 | 
    --------------             --------------
           |  < interrupt outputs >   |
           |                          |
           |_______                   |________
           |       |new wire          |       |new wire
          cut      |                 cut      |
           |       |                  |       |
           |       |                  |       |
         IRQ4     IRQ5              IRQ3     IRQ9
         B24      B23               B25      B4

   At last you have to disable lpt3 (to free IRQ5).
   That's all. Youre ready to stick the cards into the slots.


2. Configuring the kernel:
 
*  Edit the file /usr/sys/io/sioconf.c and append two new entries
   for COM3 and COM4:
   board # 2(3), enum-type IBM_BOARD, no of ports 1, int-vec 5(25),
   minor dev 4(12), port adress 3e8(2e8), int poll adr offs 0, port inc 0,
   8250-int control 8(=MCRBIT3) 

   {2,IBM_BOARD,  1,5,4,  (sd)0x3e8,0,     0,MCRBIT3}, /*ibm COM3*/
   {3,IBM_BOARD,  1,25,12,(sd)0x2e8,0,     0,MCRBIT3}, /*ibm COM4*/
                    ^^
                    for all slave-PIC interrupts you have to add
                    octal '30':  1+30=31(octal) == 25(dec)
                                      -----------------
*  Edit /usr/sys/conf/master:                        vv
      line 'sio': replace int-vect '33 and 34' with '31 and 5'.
      line 'pa' : delete interrupt entry 5 and set vsiz=1.
      line 'ex' : delete interrupt entry 31 and set vsiz=0.

*  Recompile the kernel with 'make' and copy the new kernel to /.

*  Reboot and enjoy.

BTW: What is the 'ex' - device in the master-file?

-- 
Karl-Peter Huestegge  | Voice: (+49 30) 8518198
Niedstr. 19           | UUCP : daniel.d@netmbx.UUCP
1 Berlin 41           | PSI  : PSI%45300043109::netmbx:daniel.d

ivar@acc.uu.no (Ivar Hosteng) (09/07/89)

barton@holston.UUCP (barton) writes:

>Recently the excerpt below was posted by Ross Oliver at SCO.

>>However, if you can set these boards to use other interrupts, then you
>>can use them alongside existing COM1 and COM2 devices.  To do this, you
>>will have to modify the /usr/sys/conf/master file to tell the serial
>>driver to handle the additional interrupts.  Modify the "vec3" and "vec4"
>>columns for the "sio" entry, then rebuild your kernel.

>>Ross Oliver
>>Technical Support
>>The Santa Cruz Operation, Inc.


>My question is:
>How do the entries in the vec3 and vec4 
>columns relate to the COM ports and what values should
>be placed where? Since vec1 and vec2 are 3 and 4 respectively,
>am I correct in assuming that vec1 is for COM2 which is
>normally IRQ 3 and that vec2 is for COM1 which is normally
>IRQ 4 ??

>If this is true, then are the vec3 and 4 columns also reversed
>i.e. COM4 and COM3 respectively?

>I recently tried this with an internal modem that supports
>COM1 thru COM4 and IRQ2 thru IRQ5 to no avail.

>Does anyone have any suggestions or better, definate answers?

I have a way to get one of your extra com ports working. The reason why you 
can't use both is that IRQ2 is usless for communications. To make the com port
at IRQ5 work you have to make the following changes to the file
/usr/sys/io/sioconf.c. Include the following line:

{2,IBM_BOARD,  1,5,1,  (sd)0x3e8,0,                 0,MCRBIT3}, /*ibm COM3*/
                           ^^^^^
		change this to the base address of your COM3 port.

Change this line in the master file:

sio      2  0577 104    sio  0   0   5    1   7    3     4     0   0   

to this

sio      3  0577 104    sio  0   0   5    1   7    3     4     5   0   


That's it! Just make the new kernel ( cd /usr/sys/conf and type make) and 
reboot your system. If all goes well you should see the new port in the 
startup display. Then enter single user mode and type:

mknod /dev/tty1b c 5 1
mknod /dev/tty1B c 5 129

Good luck!
-- 
Ivar E. Hosteng,	Advanced Computer Consultans, Oslo, Norway
Internet:		ivar@acc.uu.no
UUCP:			...!{uunet,mcvax,ifi}!acc.uu.no!ivar
'Just what do you think you are doing Dave?'	-HAL9000

usenet@carssdf.UUCP (UseNet Id.) (09/08/89)

Don't forget to do something like this:

mknod /dev/tty3a c 5 4
mknod /dev/tty3A c 5 132
mknod /dev/tty4a c 5 12
mknod /dev/tty4A c 5 140

for the new devices.  The minor device number is in the sioconf.c table
you just entered, but the order, 0, 8, 4, 12  is not obvious.

John Watson      ...!rutgers!carssdf!usenet