Changeset 32775 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Sep 27, 2010 1:11:27 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevAPIC.cpp
r32505 r32775 1503 1503 * @param pThis The device state. 1504 1504 */ 1505 DECLINLINE(void) ap ciDoFrequencyHinting(APICState *pThis)1505 DECLINLINE(void) apicDoFrequencyHinting(APICState *pThis) 1506 1506 { 1507 1507 if ( pThis->uHintedInitialCount != pThis->initial_count 1508 1508 || pThis->uHintedCountShift != (uint32_t)pThis->count_shift) 1509 1509 { 1510 pThis->uHintedInitialCount = pThis->initial_count;1511 pThis->uHintedCountShift = pThis->count_shift;1510 pThis->uHintedInitialCount = pThis->initial_count; 1511 pThis->uHintedCountShift = pThis->count_shift; 1512 1512 1513 1513 uint64_t cTickPerPeriod = (uint64_t)pThis->initial_count << pThis->count_shift; 1514 uint32_t uHz = TMTimerGetFreq(pThis->CTX_SUFF(pTimer)) / cTickPerPeriod; 1514 uint32_t uHz = cTickPerPeriod > 0 1515 ? TMTimerGetFreq(pThis->CTX_SUFF(pTimer)) / cTickPerPeriod 1516 : 100 /*whatever*/; 1515 1517 TMTimerSetFrequencyHint(pThis->CTX_SUFF(pTimer), uHz); 1516 1518 Log(("apic: %u Hz\n", uHz)); … … 1550 1552 pThis->next_time = pThis->initial_count_load_time + cTicksNext; 1551 1553 pThis->fTimerArmed = true; 1552 ap ciDoFrequencyHinting(pThis);1554 apicDoFrequencyHinting(pThis); 1553 1555 STAM_COUNTER_INC(&pThis->StatTimerSetInitialCountArm); 1554 1556 } … … 1650 1652 pThis->next_time = NextTS; 1651 1653 pThis->fTimerArmed = true; 1652 ap ciDoFrequencyHinting(pThis);1654 apicDoFrequencyHinting(pThis); 1653 1655 break; 1654 1656 } … … 1685 1687 TMTimerSet(pThis->CTX_SUFF(pTimer), pThis->next_time); 1686 1688 pThis->fTimerArmed = true; 1687 ap ciDoFrequencyHinting(pThis);1689 apicDoFrequencyHinting(pThis); 1688 1690 } else { 1689 1691 /* single shot. */ … … 2074 2076 s->fTimerArmed = TMTimerIsActive(s->CTX_SUFF(pTimer)); 2075 2077 if (s->fTimerArmed) 2076 ap ciDoFrequencyHinting(s);2078 apicDoFrequencyHinting(s); 2077 2079 #endif 2078 2080
Note:
See TracChangeset
for help on using the changeset viewer.