VirtualBox

Changeset 39946 in vbox for trunk/src/VBox


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

Avoid keyboard BIOS read ID race.

Location:
trunk/src/VBox/Devices/PC
Files:
2 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;
  • trunk/src/VBox/Devices/PC/BIOS/rombios.c

    r39914 r39946  
    50775077      count = 2;
    50785078      kbd_code = 0x0;
     5079ASM_START
     5080      cli // avoid racing the interrupt handler
     5081ASM_END
    50795082      outb(0x60, 0xf2);
    50805083      /* Wait for data */
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