Path: utzoo!attcan!uunet!mcvax!hp4nl!botter!star.cs.vu.nl!ast@cs.vu.nl From: ast@cs.vu.nl (Andy Tanenbaum) Newsgroups: comp.os.minix Subject: Request for advice on PS/2 problems Message-ID: <1944@ast.cs.vu.nl> Date: 22 Jan 89 22:32:09 GMT Sender: ast@cs.vu.nl Reply-To: ast@cs.vu.nl (Andy Tanenbaum) Organization: VU Informatica, Amsterdam Lines: 47 Steve Ackerman has reported getting MINIX to boot on the PS/2 Model 80. Good work! However, we are not really done yet. I have to figure out how to deal with level-triggered interrupts in a reasonable way. This message solicits suggestions. Please post them, since 10K heads are better than 1. MINIX, like all other message passing operating systems, does not do much in its interrupt routines. It just sends a message and returns from the interrupt. This means that after a floppy disk interrupt, the interrupt line would normally still be asserted. However, to shut off the 8259A interrupt controller, on line 1888, we order it to shut up. On the PS/2 this doesn't work. We have to actually talk to the device. It is probably unwise to do this inside the interupt() function. This means we have to move line 1888 to each device driver and do it there. Unpleasant but possible. However, things are worse than this. If we delete line 1888 and move it to the device drivers, when the interrupt routine is finished, we will get another interrupt. To prevent this, Steve diddled the 8259A's interrupt mask around line 1888. Double ugly. My question is: does anybody see a better and cleaner way to do this? I don't especially want the code around line 1888 having to figure out which of the 8259A's to diddle, and which bit, etc. For the floppy it may not be too bad, but for serial I/O, networking, etc, it will make things more complicated and error prone in a sensitive area. On the other hand, I don't want a major redesign of things. I think the original design is fairly simple and don't want to muck it up because of the way the PS/2 does things.) I'd also like to minimize the amount of code of the sort if (ps) /* Models 25 - 80 */ if (mca) ... /* microchannel architectures only */ if (ps && mca == FALSE) ... /* Models 25 and 30 */ etc. Hardware types, get out your thinking caps. Another point, I am still trying to figure out exactly how to tell if a machine is (1) PS/2 and (2) Microchannel. Several people have pointed out that INT 15 is supposed to tell you, but I can't find that in my (PC) BIOS manual. Maybe it is something new. Could some kind soul please write a little piece of code that can be added to klib88.s making the call to int15, and then write the C code for using this call to set the variables ps and mca in such a way that it works on PC, XT, AT, and PS/2 (preferably without including a complete expert system in there). Thanks. Andy Tanenbaum (ast@cs.vu.nl)