home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / linux / 21175 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  2.7 KB

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