VirtualBox

Changeset 55873 in vbox


Ignore:
Timestamp:
May 15, 2015 10:35:21 AM (9 years ago)
Author:
vboxsync
Message:

KBC: Allow word reads of KBC status register.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Input/DevPS2.cpp

    r54877 r55873  
    13921392PDMBOTHCBDECL(int) kbdIOPortStatusRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
    13931393{
     1394    uint16_t    fluff = 0;
     1395    KBDState    *pThis = PDMINS_2_DATA(pDevIns, KBDState *);
     1396
    13941397    NOREF(pvUser);
    1395     if (cb == 1)
    1396     {
    1397         KBDState *pThis = PDMINS_2_DATA(pDevIns, KBDState *);
    1398         *pu32 = kbd_read_status(pThis, Port);
     1398    switch (cb) {
     1399    case 2:
     1400        fluff = 0xff00;
     1401    case 1:
     1402        *pu32 = fluff | kbd_read_status(pThis, Port);
    13991403        Log2(("kbdIOPortStatusRead: Port=%#x cb=%d -> *pu32=%#x\n", Port, cb, *pu32));
    14001404        return VINF_SUCCESS;
    1401     }
    1402     AssertMsgFailed(("Port=%#x cb=%d\n", Port, cb));
    1403     return VERR_IOM_IOPORT_UNUSED;
     1405    default:
     1406        AssertMsgFailed(("Port=%#x cb=%d\n", Port, cb));
     1407        return VERR_IOM_IOPORT_UNUSED;
     1408    }
    14041409}
    14051410
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