VirtualBox

Changeset 34879 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 9, 2010 11:42:16 AM (14 years ago)
Author:
vboxsync
Message:

HPET: minor cleanup, more forgiving behavior

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevHPET.cpp

    r33662 r34879  
    706706    uint32_t    iIndex = (uint32_t)(GCPhysAddr - HPET_BASE);
    707707
    708     LogFlow(("hpetMMIORead: %llx (%x)\n", (uint64_t)GCPhysAddr, iIndex));
     708    LogFlow(("hpetMMIORead (%d): %llx (%x)\n", cb, (uint64_t)GCPhysAddr, iIndex));
    709709
    710710    rc = hpetLock(pThis, VINF_IOM_HC_MMIO_READ);
     
    738738            {
    739739                AssertMsgFailed(("Unaligned HPET read access\n"));
    740                 rc = VERR_INTERNAL_ERROR;
     740                rc = VINF_SUCCESS;
    741741                break;
    742742            }
     
    784784    uint32_t iIndex = (uint32_t)(GCPhysAddr - HPET_BASE);
    785785
    786     LogFlow(("hpetMMIOWrite: %llx (%x) <- %x\n",
    787              (uint64_t)GCPhysAddr, iIndex, *(uint32_t*)pv));
     786    LogFlow(("hpetMMIOWrite (%d): %llx (%x) <- %x\n",
     787             cb, (uint64_t)GCPhysAddr, iIndex, cb >= 4 ? *(uint32_t*)pv : 0xdeadbeef));
    788788
    789789    rc = hpetLock(pThis, VINF_IOM_HC_MMIO_WRITE);
     
    796796        case 2:
    797797            Log(("Narrow write: %d\n", cb));
    798             rc = VERR_INTERNAL_ERROR;
     798            rc = VINF_SUCCESS;
    799799            break;
    800800        case 4:
     
    820820            {
    821821                AssertMsgFailed(("Unaligned HPET write access\n"));
    822                 rc = VERR_INTERNAL_ERROR;
     822                rc = VINF_SUCCESS;
    823823                break;
    824824            }
     
    12131213
    12141214    /* Query configuration. */
    1215 #if 1
    12161215    rc = CFGMR3QueryBoolDef(pCfg, "GCEnabled", &fRCEnabled, true);
    12171216    if (RT_FAILURE(rc))
     
    12231222        return PDMDEV_SET_ERROR(pDevIns, rc,
    12241223                                N_("Configuration error: failed to read R0Enabled as boolean"));
    1225 #endif
    12261224    /* Initialize the device state */
    12271225    rc = hpetInit(pDevIns);
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