VirtualBox

Ignore:
Timestamp:
Feb 1, 2012 11:17:06 PM (13 years ago)
Author:
vboxsync
Message:

Avoid keyboard BIOS read ID race.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS-new/keyboard.c

    r39914 r39946  
    660660        count = 2;
    661661        kbd_code = 0x0;
     662        //@todo: Might be better to just mask the KB interrupt
     663        int_disable();
    662664        outb(0x60, 0xf2);
    663665        /* Wait for data */
    664666        max=0xffff;
    665         while ( ((inb(0x64) & 0x01) == 0) && (--max>0) ) outb(0x80, 0x00);
     667        while ( ((inb(0x64) & 0x01) == 0) && (--max>0) )
     668            inb(0x80);
    666669        if (max>0x0) {
    667670            if ((inb(0x60) == 0xfa)) {
    668671                do {
    669672                    max=0xffff;
    670                     while ( ((inb(0x64) & 0x01) == 0) && (--max>0) ) outb(0x80, 0x00);
     673                    while ( ((inb(0x64) & 0x01) == 0) && (--max>0) )
     674                        inb(0x80);
    671675                    if (max>0x0) {
    672676                        kbd_code >>= 8;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette