Changeset 37541 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Jun 17, 2011 1:09:56 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevHPET.cpp
r37539 r37541 245 245 PDMCRITSECT csLock; 246 246 247 /** If we emulate ICH9 HPET (different frequency). 248 * @todo different number of timers */ 247 /** If we emulate ICH9 HPET (different frequency & timer count). */ 249 248 bool fIch9; 250 249 uint8_t padding0[7]; … … 514 513 if (iTimerNo >= HPET_CAP_GET_TIMERS(pThis->u32Capabilities)) 515 514 { 516 LogRel(("HPET: using timer above configured range: %d\n", iTimerNo)); 515 static unsigned s_cOccurences = 0; 516 if (s_cOccurences++ < 10) 517 LogRel(("HPET: using timer above configured range: %d\n", iTimerNo)); 517 518 return VINF_SUCCESS; 518 519 } … … 528 529 529 530 uint64_t u64Mask = HPET_TN_CFG_WRITE_MASK; 530 if ( (pHpetTimer->u64Config & HPET_TN_PERIODIC_CAP) != 0)531 if (pHpetTimer->u64Config & HPET_TN_PERIODIC_CAP) 531 532 u64Mask |= HPET_TN_PERIODIC; 532 533 533 if ( (pHpetTimer->u64Config & HPET_TN_SIZE_CAP) != 0)534 if (pHpetTimer->u64Config & HPET_TN_SIZE_CAP) 534 535 u64Mask |= HPET_TN_32BIT; 535 536 else 536 537 u32NewValue &= ~HPET_TN_32BIT; 537 538 538 if ( (u32NewValue & HPET_TN_32BIT) != 0)539 if (u32NewValue & HPET_TN_32BIT) 539 540 { 540 541 Log(("setting timer %d to 32-bit mode\n", iTimerNo)); … … 544 545 if ((u32NewValue & HPET_TN_INT_TYPE) == HPET_TIMER_TYPE_LEVEL) 545 546 { 546 LogRel(("level-triggered config not yet supported\n")); 547 static unsigned s_cOccurences = 0; 548 if (s_cOccurences++ < 10) 549 LogRel(("level-triggered config not yet supported\n")); 547 550 AssertFailed(); 548 551 } … … 567 570 if (pHpetTimer->u64Config & HPET_TN_PERIODIC) 568 571 { 569 u32NewValue &= hpetInvalidValue(pHpetTimer) >> 1; 570 pHpetTimer->u64Period = (pHpetTimer->u64Period & UINT64_C(0xffffffff00000000)) 571 | u32NewValue; 572 u32NewValue &= hpetInvalidValue(pHpetTimer) >> 1; /** @todo check this in the docs and add a not why? */ 573 pHpetTimer->u64Period = RT_MAKE_U64(u32NewValue, pHpetTimer->u64Period); 572 574 } 573 574 pHpetTimer->u64Cmp = (pHpetTimer->u64Cmp & UINT64_C(0xffffffff00000000)) 575 | u32NewValue; /** @todo RT_MAKE_U64 */ 576 575 pHpetTimer->u64Cmp = RT_MAKE_U64(u32NewValue, pHpetTimer->u64Cmp); 577 576 pHpetTimer->u64Config &= ~HPET_TN_SETVAL; 578 577 Log2(("after HPET_TN_CMP cmp=%#llx per=%#llx\n", pHpetTimer->u64Cmp, pHpetTimer->u64Period));
Note:
See TracChangeset
for help on using the changeset viewer.