VirtualBox

Changeset 16158 in vbox for trunk/src


Ignore:
Timestamp:
Jan 22, 2009 10:21:12 AM (16 years ago)
Author:
vboxsync
Message:

reapplied PIT fix from 41876

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevPit-i8254.cpp

    r16148 r16158  
    178178    {
    179179        if (s->u64NextTS == UINT64_MAX)
    180             return 1; /** @todo check this value. */
     180        {
     181            d = ASMMultU64ByU32DivByU32(TMTimerGet(pTimer) - s->count_load_time, PIT_FREQ, TMTimerGetFreq(pTimer));
     182            return s->count - (d % s->count); /** @todo check this value. */
     183        }
    181184        d = TMTimerGet(pTimer);
    182185        d = ASMMultU64ByU32DivByU32(d - s->u64ReloadTS, s->count, s->u64NextTS - s->u64ReloadTS);
    183186        if (d >= s->count)
    184187            return 1;
    185         return s->count - d;
     188        return  s->count - d;
    186189    }
    187190    d = ASMMultU64ByU32DivByU32(TMTimerGet(pTimer) - s->count_load_time, PIT_FREQ, TMTimerGetFreq(pTimer));
     
    866869        s->bcd = 0;
    867870#endif
     871        s->u64NextTS = UINT64_MAX;
    868872        s->cRelLogEntries = 0;
    869873        s->mode = 3;
     
    11021106#endif /* IN_RING3 */
    11031107#endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
    1104 
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