Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!umich!sharkey!wyn386!danielw From: danielw@wyn386.mi.org (Daniel Wynalda) Newsgroups: comp.unix.xenix.sco Subject: Re: Using COM3 under SCO XENIX Message-ID: <613@wyn386.mi.org> Date: 19 Sep 90 20:59:21 GMT References: <3446@dftsrv.gsfc.nasa.gov> <402@tygra.UUCP> Reply-To: danielw@wyn386.UUCP (Daniel Wynalda) Organization: Wynalda Litho Inc, Rockford MI Lines: 495 In article <402@tygra.UUCP> cat@tygra.UUCP (CAT-TALK Maint. Account) writes: >In article <3446@dftsrv.gsfc.nasa.gov> spiesman@amarna.gsfc.nasa.gov writes: > >There is a way to hack the system configuration file to recognize the >ports, but I don't have it handy. I tried it and couldn't get it to >work. SCO will not "support" kernels which have been so hacked and will >ask you to remove the hack if/when you are trying to troubleshoot another >problem and ask for their assistance. All of this info was given to me >by SCO when I called and asked about COM3 and COM4. Every 6 months this issue comes up again. It is possible, I use the COM3 on my machine daily. Here's the mail I got that allowed me to edit my own master file in /usr/sys/conf and also to make the proper devices. Of course you have to configure your own interrupts and put them in the right files. This included editing /usr/sys/io/sioconf.h and then compiling and linking it into /usr/sys/io/libio.a. Daniel Wynalda | (616) 866-1561 X22 Ham:N8KUD Net:danielw@wyn386.mi.org Wynalda Litho Inc. | 8221 Graphic Industrial Pk. | Rockford, MI 49341 -- cut here -- From sharkey!shadooby!samsung!cs.utexas.edu!jarvis.csri.toronto.edu!utgpu!utzoo!yunexus!ists!yunccn!shields Mon Jan 8 09:27:20 EST 1990 Article 5097 of comp.unix.xenix: Path: wyn386!sharkey!shadooby!samsung!cs.utexas.edu!jarvis.csri.toronto.edu!utgpu!utzoo!yunexus!ists!yunccn!shields >From: shields@nccn.yorku.ca (Paul Shields) Newsgroups: comp.unix.xenix Subject: Re: Hacking a dumb serial card... Message-ID: <9001041244.AA04440@nccn.yorku.ca> Date: 3 Jan 90 16:14:12 GMT Lines: 39 To: stever@tree.uucp Cc: shields Steve, You asked in comp.unix.xenix... >I captured a previous posting in which someone described how they modified >the kernel to add a 3rd serial port using a card configured as "com3" and >modifying the card so it used IRQ 5. Well, what if neither IRQ 5 nor IRQ 7 >are availale? I have a two port serial card which I can configure as com3 >and com4. Can I hack it to use IRQ 10 and IRQ11 (for example) and install >it using the same basic kernel modification? Remember, to make use IRQ lines above 7, the serial card must have the AT extended bus connector. Your guess is as good as mine if you start cutting traces on the card. I used a board called the Sigma AT Maximizer, that is basically 4MB memory card with 2 serial ports thrown in. It allowed COM3 and COM4 to take IRQ11 and IRQ12 through a couple of jumpers. The changes to the kernel were minimal: % cd /usr/sys/io % diff sioconf.c.dst sioconf.c 79,80c79,83 < {2,MITS_BOARD, 4,27, 4,(sd)0x400,0x400+MITS_POLL, 16,MCRBIT3}, /*mitsu 4*/ < {3,MITS_BOARD, 4,28,12,(sd)0x408,0x408+MITS_POLL, 16,MCRBIT3}, /*mitsu 4*/ --- > {2,IBM_BOARD, 1,28,4, (sd)0x3e8,0, 0,MCRBIT3}, /*ibm COM3*/ > {3,IBM_BOARD, 1,27,12,(sd)0x2e8,0, 0,MCRBIT3}, /*ibm COM4*/ > > /*{2,MITS_BOARD, 4,27, 4,(sd)0x400,0x400+MITS_POLL, 16,MCRBIT3},*/ /*mitsu 4*/ > /*{3,MITS_BOARD, 4,28,12,(sd)0x408,0x408+MITS_POLL, 16,MCRBIT3},*/ /*mitsu 4*/ All that was required was to set the jumpers, modify sioconf.c, make and install the kernel, and reboot. Hope this helps. Paul Shields shields@nccn.yorku.ca The following text was extracted from a usenet message in comp.unix.xenix. It describes how to add additional IBM-Standard COMM PORTS as comm3 and comm4 under SCO Xenix. --------------------------------------------------------------------------- 1. edited sioconf.c My internal modem card can use IO addresses 3f8,2f8,3e8 and 2e8 which correspond com1,com2,com3 and com4 and IRQ lines IRQ3,IRQ4, IRQ5 and IRQ9. My 1-port rs-card can be configured as com1-com4, but com3 uses IO address 338/IRQ2 and com4 uses 238/IRQ5. I added new descriptors to sioconf.c for internal modem: IO 2e8 and IRQ5 (IRQ9 cannot be used), board type IBM_BOARD, port count 1, minor dev base 12, interrupt poll addr 0, increment 0 and for 1-port rs-card: IO 338 and IRQ2, IBM_BOARD, port count 1, minor dev base 4, interrupt poll 0, increment 0. 2. edited master master file contains information about different devices including interrupt vectors used. Serial (marked sio) devices used originally IRQs 3,4,33 and 34. I tried those my modem card supports: 3,4,5 and 9, but config program didn't like IRQ9, so I used IRQ2 instead. IRQ5 is used originally for second parallel adapter (centronics), the main parallel adapter is connected to IRQ7 so I used this unused IRQ5 for internal modem card. I replaced the original IRQ5 on the pa (parallel) line with 0 and replaced the original vector count 2 with 1. This 'pa' line can be found in master file like 'sio' line. Interrupt vector count is 4 for 'sio' line. 3. make I recompiled all modified sources with make (yes, you need development system to do this) and copied the just linked new kernel to the root directory (/comx). 4. reboot I rebooted my system and to the boot-prompt I entered comx (name of the new untested kernel). Everything worked fine, com1, com2, com3 and the internal modem as com4 were found. ------------------------------------------------------------------------------- Article 3305 of comp.unix.xenix: Path: wyn386!sharkey!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!mcsun!unido!tub!tmpmbx!netmbx!blume From: blume@netmbx.UUCP (Heiko Blume) Newsgroups: comp.unix.xenix,comp.sys.ibm.pc Subject: Re: Using serial devices under SCO Xenix above COM 2 Summary: How To Install COM3 and COM4 under Xenix Keywords: /usr/sys/conf/master, /usr/sys/io/sioconf.c IRQ3,4,5,2 Message-ID: <3387@netmbx.UUCP> Date: 6 Sep 89 00:36:54 GMT References: <448@holston.UUCP> Reply-To: daniel.d@netmbx.UUCP (Karl-Peter Huestegge) Organization: netmbx Public Access Unix, Berlin, West Germany Lines: 111 Xref: wyn386 comp.unix.xenix:3305 comp.sys.ibm.pc:11338 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 Article 4861 of comp.unix.xenix: Path: wyn386!sharkey!shadooby!samsung!cs.utexas.edu!uunet!mcsun!hp4nl!telmail!neabbs!coertvnk From: coertvnk@neabbs.UUCP (COERT VONK) Newsgroups: comp.unix.xenix Subject: Re: COM3 Under Xenix Message-ID: <265545@neabbs.UUCP> Date: 18 Dec 89 23:58:53 GMT Organization: NEABBS multi-line BBS +31-20-717666 (13x), Amsterdam, Holland Lines: 148 Dear Ademola Taiwo : I can not supply you with that specific copy, but this is what I have on that subject (I don't know the name of the original author) : How to add comm3 and comm4 under SCO Xenix Coert Vonk October 22, 1989 The basement of the following text was extracted from a usenet message in comp.unix.xenix. It describes how to add additional IBM-Standard COMM PORTS as comm3 and comm4 under SCO Xenix. 1. what do we have? ~~~~~~~~~~~~~~~~~~~~ IBM-Standard COMM PORTS may be characterized as: name base irq address --------------------------- comm1 0x3f8 4 comm2 0x2f8 3 comm3 0x3e8 5 comm4 0x2e8 2 If you think this looks to organized I can set you at ease. At the time IBM released his PC-XT/AT machines, only comm1 and comm2 were defined. Pushed by the demand of the market clone manufactures developed two other sio ports. Due to the lack of concerted attention there exist almost more characteristics for these ports than manufactures. With the release of PS/2 machines IBM set the standard for the comm3 and comm4 ports as represented above. Although all kinds of sio ports may be added, I focus to the standard address and irq of comm3. By the way if you intend to your another irq, you could check if it's is currently in by the /usr/sys/conf/vectorsinuse command (or read the master file yourself, more about this later). 2. edit sioconf.c ~~~~~~~~~~~~~~~~~~ Add new a descriptor to /usr/sys/io/sioconf.c using an ordinary text editor (i.e. vi,lyrix). It should have the format as descripted in /usr/sys/io/sioconf.h : int b_num; /* board number */ int b_type; /* each manufacturer gets a different one */ int b_pcnt; /* port count on the board */ int b_vec; /* interrupt vector */ int b_dev; /* minor dev base */ sd b_addr; /* base address of board */ int b_poll; /* interrupt poll addr */ int b_inc; /* increment (spacing) of io ports on board */ int b_outbits; /* value for OUT1/OUT2 bits in MCR */ Doing so we get: {2,IBM_BOARD, 1,5,4, (sd)0x3e8,0, 0,MCRBIT3}, /*ibm COM3*/ Some remarks on this: -- the next available IBM_BOARD board number is 2 (3 for comm4) -- I use irq5 for the board (irq2 for comm4) -- the minor device base is 4 (could be 12 for comm4) -- the base address is 0x3e8 (0x2e8 for comm4) 3. edited master ~~~~~~~~~~~~~~~~~ The /usr/sys/conf/master file contains information about different devices including interrupt vectors used. Serial (marked sio) devices used originally irqs 3,4,33 and 34. The irq33 and irq34 were originally placed in the table because Xenix got confused by the comm3 or comm4 port, and took it for a 4-port. vec.cnt irqA irqB irqC irqD ------------------------------------------------------------- sio 4 0577 104 sio 0 0 5 1 7 3 4 33 34 pa 2 0133 004 pa 0 0 6 1 2 5 7 0 0 When we correct this recognition problem we get: sio 2 0577 104 sio 0 0 5 1 7 3 4 0 0 pa 2 0133 004 pa 0 0 6 1 2 5 7 0 0 If we want to use irq5 for comm3, we have to steal if from parallel adapter. This brings the vector count for pa down to 1. sio 2 0577 104 sio 0 0 5 1 7 3 4 0 0 pa 1 0133 004 pa 0 0 6 1 2 7 0 0 0 By now it is time to introduce my new comm port. Filling in it's irq vector of 5, increments the sio vector count by one. Yielding in: sio 3 0577 104 sio 0 0 5 1 7 3 4 5 0 pa 1 0133 004 pa 0 0 6 1 2 7 0 0 0 I think now the time has come to make the machine contribute his/her part ... 4. make ~~~~~~~~ I recompiled all modified sources with make (yes, you need development system to do this) and copied the just linked new kernel to the root directory (/xenix.comm3). 5. reboot ~~~~~~~~~~ I rebooted my system and to the boot-prompt I entered xenix.comm3 (name of the new untested kernel). Everything worked fine, comm1, comm2, and comm3 were found. Help save the world! Communicate any problems and suggestions to me, mcsun!hp4nl!neabbs!coertvnk (Coert Vonk). ____ By the way, I am interested in an internship at an American University. Any ideas ..., please e-mail them. ____ / / Uucp address: Mailing address: / ___ __ __ __/ mcsun!hp4nl!neabbs!coertvnk Eikstraat 17 / / / /_/ / / Telephone: 4621 JL Bergen op Zoom /___ /__/ /__ / /__ + 31 1640 42366 The Netherlands Article 3308 of comp.unix.xenix: Path: wyn386!sharkey!mailrus!wuarchive!wugate!uunet!mcsun!sunic!ifi!acc.uu.no!ivar From: ivar@acc.uu.no (Ivar Hosteng) Newsgroups: comp.unix.xenix,comp.sys.ibm.pc Subject: Re: Using serial devices under SCO Xenix above COM 2 Keywords: /usr/sys/conf/master, sio, vec3, vec4 Message-ID: <104@accsys.acc.uu.no> Date: 6 Sep 89 17:51:30 GMT References: <448@holston.UUCP> Followup-To: comp.unix.xenix Organization: Advanced Computer Consultants, Oslo, Norway Lines: 62 Xref: wyn386 comp.unix.xenix:3308 comp.sys.ibm.pc:11357 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 -- Daniel Wynalda | (616) 866-1561 X22 Ham:N8KUD Net:danielw@wyn386.mi.org Wynalda Litho Inc. | 8221 Graphic Industrial Pk. | Rockford, MI 49341