Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!texbell!vector!attctc!chasm From: chasm@attctc.Dallas.TX.US (Charles Marslett) Newsgroups: comp.os.minix Subject: Re: ATI VGAWonder Summary: "Traditional INT-2 problem" Keywords: interrupt hang incompatibility Message-ID: <11042@attctc.Dallas.TX.US> Date: 18 Jan 90 06:35:06 GMT References: <1990Jan16.044748.18071@ux1.cso.uiuc.edu> <2275@kodak.UUCP> Organization: The Unix(R) Connection, Dallas, Texas Lines: 63 In article <2275@kodak.UUCP>, hysell@kodak.UUCP (John Hysell) writes: > In article <1990Jan16.045403.18941@ux1.cso.uiuc.edu>, bc@ux1.cso.uiuc.edu (B.C.) writes: > > I got the following message: > > > > Unexpected interrupt or trap: vector = 13. pc = 0x147 text+data+bss = 0x11E > > > > My Norton Programmer's Guide tells me that interrupt 13 (decimal) is invoked > > during the vertical retrace period on a color display. I am using an ATI > > VGAWonder 512k VGA card. It seems to work OK, but I have gotten this error > > twice. Paul Allen tells me that the kernel ought to charge right on after it > > gets this error, but it doesn't -- it hangs. Completely. > > The problem is that the ATI card is generating an interrupt on a (BIOS) mode set -- and there is no routine to handle it. Some motherboard BIOSes clear the interrupt (being designed after the VGA came out), others do not. A (really) permanent fix is to cut the INT-2 line on the VGA Wonder card (not nice, really). Another, more esthetic, and less reliable, fix is to execute the following code fragment before starting MINIX (say in the boot image initialzation code): MOV DX,03D4h ; Get the CRTC address MOV AL,11h ; Select register 0x11, Vertical-Sync-End OUT DX,AL INC DX IN AL,DX ; Read the old value OR AL,20h ; Set bit 5 (disable vertical interrupts) AND AL,0FFH-10h ; Clear any pending vertical interupt OUT DX,AL ; Issue the new state JMP $+2 ; For those with latent paranoia JMP $+2 ; (or who have programmed 3780s) JMP $+2 OUT DX,AL ; We clear the interrupts twice! If this fixes the problem, it's a general one, not unique to ATI -- and it's the reason IBM cut the interrupt pin loose on the true blue VGA. Charles Marslett chasm@attctc.dallas.tx.us [of course, it could also be unique to ATI, and then this is all non-sequitur] > problems. I finally found that if I booted DOS and used the ATI utility > program VSETUP and forced the card into CGA; SHUT OFF THE XT; and then booted > MINIX from a cold start, everything would work fine. > Later, while running MINIX 1.2 on the AT, I did not have these problems. > The chief difference (aside from obvious machine change) was that I have > reconfigured the ATI card for 16-bit I/O. Under MINIX 1.3, it remains very > stable. (Next; to try MINIX 1.5) It should be more stable, the EGA is (rather) well supported with 1.3, but did not work to well with 1.1 or 1.2. > Good luck; > -John Hysell > hysell@kodak.com > hysell@kodak.uucp Ditto, Charles Marslett chasm@attctc.dallas.tx.us