Changeset 3265 in vbox
- Timestamp:
- Jun 25, 2007 8:50:42 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Input/DevPS2.cpp
r2981 r3265 166 166 #define AUX_RESET 0xFF /* Reset aux device */ 167 167 #define AUX_ACK 0xFA /* Command byte ACK. */ 168 #ifdef VBOX 169 #define AUX_NACK 0xFE /* Command byte NACK. */ 170 #endif 168 171 169 172 #define MOUSE_STATUS_REMOTE 0x40 … … 505 508 /* ignore that - I don't know what is its use */ 506 509 break; 510 #ifdef VBOX /* Make OS/2 happy. */ 511 /* The 8042 RAM is readble using commands 0x20 thru 0x3f, and writable 512 by 0x60 thru 0x7f. Now days only the firs byte, the mode, is used. 513 We'll ignore the writes (0x61..7f) and return 0 for all the reads 514 just to make some OS/2 debug stuff a bit happier. */ 515 case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: 516 case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: 517 case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: 518 case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: 519 kbd_queue(s, 0, 0); 520 Log(("kbd: reading non-standard RAM addr %#x\n", val & 0x1f)); 521 break; 522 #endif 507 523 default: 508 524 Log(("kbd: unsupported keyboard cmd=0x%02x\n", val)); … … 898 914 break; 899 915 default: 916 #ifdef VBOX 917 /* NACK all commands we don't know. 918 919 The usecase for this is the OS/2 mouse driver which will try 920 read 0xE2 in order to figure out if it's a trackpoint device 921 or not. If it doesn't get a NACK (or ACK) on the command it'll 922 do several hundred thousand status reads before giving up. This 923 is slows down the OS/2 boot up considerably. (It also seems that 924 the code is somehow vulnerable while polling like this and that 925 mouse or keyboard input at this point might screw things up badly.) 926 927 From http://www.win.tue.nl/~aeb/linux/kbd/scancodes-13.html: 928 929 Every command or data byte sent to the mouse (except for the 930 resend command fe) is ACKed with fa. If the command or data 931 is invalid, it is NACKed with fe. If the next byte is again 932 invalid, the reply is ERROR: fc. */ 933 /** @todo send error if we NACKed the previous command? */ 934 kbd_queue(s, AUX_NACK, 1); 935 #endif 900 936 break; 901 937 }
Note:
See TracChangeset
for help on using the changeset viewer.