home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / linux / 20850 < prev    next >
Encoding:
Text File  |  1992-12-17  |  2.1 KB  |  54 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!umn.edu!The-Star.honeywell.com!saifr00.cfsat.honeywell.com!troyer
  3. From: troyer@saifr00.cfsat.honeywell.com (Dean Troyer)
  4. Subject: Re: keyboard problems - v.99
  5. Message-ID: <1992Dec17.155617.1581@saifr00.cfsat.honeywell.com>
  6. Organization: Honeywell Air Transport Systems Division
  7. References: <1992Dec15.022727.27072@cc.gatech.edu> <JEM.92Dec16212729@lk-hp-6.hut.fi>
  8. Date: Thu, 17 Dec 92 15:56:17 GMT
  9. Lines: 43
  10.  
  11. In article <JEM.92Dec16212729@lk-hp-6.hut.fi> jem@snakemail.hut.fi (Johan Myreen) writes:
  12. >
  13. >On a related note: does anybody know what the following lines in
  14. >keyboard.c are good for? The same code (in assembler) is in
  15. >boot/setup.S, too. Is this some kind of standard practice?
  16.  
  17. I've seen this done in Int09 handlers under DOS.  It usually appears at the
  18. end of the ISR, with a comment like 'reset keyboard'.
  19.  
  20. >         pt_regs = (struct pt_regs *) int_pt_regs;
  21. >         scancode=inb_p(0x60);
  22. >!        x=inb_p(0x61);
  23. >!        outb_p(x|0x80, 0x61);
  24. >!        outb_p(x&0x7f, 0x61);
  25. >         if (scancode == 0xe0)
  26. >                 set_kbd_flag(KG_E0);
  27. >
  28. >The ins and outs toggle a bit in the keyboard controller's RAM. This
  29.  
  30. Port 61 is listed in my BIOS reference as being the PS/2 System Port B, although
  31. it's not unique to PS/2s.  It's uses include the speaker hardware & timer
  32. control bits.  Check out the Mach sources kd.h.  The bummer is that I can't
  33. find the purpose of bit 7 documented anywhere!  I suspect it controls one
  34. of the keyboard controller's input pins.
  35.  
  36. >RAM location is not documented by IBM, or at least I haven't been able
  37. >to find it in the Technical References. The only documented i/o
  38. >addresses are 0x60 (data) and 0x64 (status), and the keyboard driver
  39. >should work perfectly without this bit fiddling. In fact, I even tried
  40. >removing them, with no ill effects.
  41. >
  42. >--
  43. >Johan Myreen
  44. >jem@cs.hut.fi
  45.  
  46. dt
  47.  
  48.  
  49. -- 
  50. Dean Troyer                               troyer@saifr00.cfsat.Honeywell.COM
  51. Honeywell Commercial Flight Systems       72240.3152@compuserve.com
  52. Phoenix AZ
  53. (602) 436-3613
  54.