home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!hri.com!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!dkuug!diku!frank
- From: frank@diku.dk (Frank Damgaard)
- Newsgroups: comp.os.linux
- Subject: Re: keyboard problems - v.99
- Message-ID: <1992Dec20.180648.1553@odin.diku.dk>
- Date: 20 Dec 92 18:06:48 GMT
- References: <JEM.92Dec16212729@lk-hp-6.hut.fi> <1992Dec20.022211.13865@newsserver.rrzn.uni-hannover.de>
- Sender: frank@ask.diku.dk
- Organization: Department of Computer Science, U of Copenhagen
- Lines: 53
-
- riepe@ifwsn4.ifw.uni-hannover.de (Michael Riepe) writes:
-
- >In article 92Dec16212729@lk-hp-6.hut.fi, jem@snakemail.hut.fi (Johan Myreen) writes:
- >|>In article <1992Dec15.022727.27072@cc.gatech.edu> ammo@cc.gatech.edu (Ammo Goettsch) writes:
- >|>
- >|>[lines deleted]
- >|>
- >|>On a related note: does anybody know what the following lines in
- >|>keyboard.c are good for? The same code (in assembler) is in
- >|>boot/setup.S, too. Is this some kind of standard practice?
- >|>
- >|> pt_regs = (struct pt_regs *) int_pt_regs;
- >|> scancode=inb_p(0x60);
- >|>! x=inb_p(0x61);
- >|>! outb_p(x|0x80, 0x61);
- >|>! outb_p(x&0x7f, 0x61);
- >|> if (scancode == 0xe0)
- >|> set_kbd_flag(KG_E0);
- >|>
- >|>The ins and outs toggle a bit in the keyboard controller's RAM. This
- >|>RAM location is not documented by IBM, or at least I haven't been able
- >|>to find it in the Technical References. The only documented i/o
- >|>addresses are 0x60 (data) and 0x64 (status), and the keyboard driver
- >|>should work perfectly without this bit fiddling. In fact, I even tried
- >|>removing them, with no ill effects.
-
- >IMHO, this piece of code is of no use; it was used to reset the
- >keyboard strobe on ancient PC's and XT's which had no keyboard
- >controller but just a shift register for serial->parallel conversion.
-
- I assume the code is leftover from MINIX version 1.0.
- (see Operating Systems by Andrew S. Tanembaum, page 516,line 4120-4124)
- Minix was intended to work on XT's , which had an 8255 parallel port
- as keyboard controller.
- AT (& PS/2) compatibles normally use a keyboard controller
- (8042/8742 Universal Peripheral Interface microprocessor),
- so the code at best does no harm.
-
- All references to port 0x61 should be removed, as Linux
- is not intended to run on PX/XT's (<=80286).
-
- On the Olivetti P500 (MCA PS/2 compatible) port 0x61 is the
- system control port B, and strobing bit 7 sets/resets IRQ 0.
- (according to
- "P500 Hardware-Acrhiteture and Function, OEM technical manual")
-
- I have since Linux 0.95a removed the lines strobing port 0x61,
- and it seems to do no harm (keyboard still works on AT compatibles).
- (PS. Linux still doesn't work on MCA, but I'm working on it.)
- --------
- Frank Damgaard
- frank@diku.dk
- (institute of Computer Science at University of Copenhagen, Denmark)
-