Changeset 37324 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Jun 3, 2011 4:28:03 PM (14 years ago)
- Location:
- trunk/src/VBox/Devices/PC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevAPIC.cpp
r36024 r37324 1427 1427 Assert(pThis->pTimerR3 == pTimer); 1428 1428 Assert(pThis->fTimerArmed); 1429 Assert(PDMCritSectIsOwned(dev->pCritSectR3)); 1429 1430 1430 1431 if (!(pThis->lvt[APIC_LVT_TIMER] & APIC_LVT_MASKED)) { -
trunk/src/VBox/Devices/PC/DevHPET.cpp
r36971 r37324 364 364 if (u32TillWrap < (uint32_t)u64Diff) 365 365 { 366 Log(("wrap on timer %d: till=%u ticks=%lld diff64=%lld\n", 366 Log(("wrap on timer %d: till=%u ticks=%lld diff64=%lld\n", 367 367 pTimer->u8TimerNumber, u32TillWrap, u64Ticks, u64Diff)); 368 368 u64Diff = u32TillWrap; … … 1063 1063 HpetTimer *pTimer = (HpetTimer *)pvUser; 1064 1064 uint64_t u64Period = pTimer->u64Period; 1065 uint64_t u64CurTick = hpetGetTicks(pThis); 1065 uint64_t u64CurTick = hpetGetTicks(pThis); /** @todo this should be done AFTER locking the HPET. */ 1066 1066 uint64_t u64Diff; 1067 1067 int rc; … … 1146 1146 /* capable of periodic operations and 64-bits */ 1147 1147 if (pThis->fIch9) 1148 pTimer->u64Config = (i == 0) ? 1149 (HPET_TN_PERIODIC_CAP | HPET_TN_SIZE_CAP) 1150 : 1148 pTimer->u64Config = (i == 0) ? 1149 (HPET_TN_PERIODIC_CAP | HPET_TN_SIZE_CAP) 1150 : 1151 1151 0; 1152 1152 else 1153 1153 pTimer->u64Config = HPET_TN_PERIODIC_CAP | HPET_TN_SIZE_CAP; 1154 1154 1155 1155 /* We can do all IRQs */ 1156 1156 uint32_t u32RoutingCap = 0xffffffff; … … 1186 1186 static int hpetInit(PPDMDEVINS pDevIns) 1187 1187 { 1188 unsigned i;1189 int rc;1190 1188 HpetState *pThis = PDMINS_2_DATA(pDevIns, HpetState *); 1191 1189 … … 1194 1192 pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns); 1195 1193 1196 for ( i = 0; i < HPET_NUM_TIMERS; i++)1197 { 1198 HpetTimer * timer = &pThis->aTimers[i];1199 1200 timer->pHpetR3 = pThis;1201 timer->pHpetR0 = PDMINS_2_DATA_R0PTR(pDevIns);1202 timer->pHpetRC = PDMINS_2_DATA_RCPTR(pDevIns);1203 1204 rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_VIRTUAL_SYNC, hpetTimer, timer,1205 TMTIMER_FLAGS_DEFAULT_CRIT_SECT, "HPET Timer",1206 &pThis->aTimers[i].pTimerR3);1194 for (unsigned i = 0; i < HPET_NUM_TIMERS; i++) 1195 { 1196 HpetTimer *pTimer = &pThis->aTimers[i]; 1197 1198 pTimer->pHpetR3 = pThis; 1199 pTimer->pHpetR0 = PDMINS_2_DATA_R0PTR(pDevIns); 1200 pTimer->pHpetRC = PDMINS_2_DATA_RCPTR(pDevIns); 1201 1202 int rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_VIRTUAL_SYNC, hpetTimer, pTimer, 1203 TMTIMER_FLAGS_DEFAULT_CRIT_SECT, "HPET Timer", 1204 &pThis->aTimers[i].pTimerR3); 1207 1205 if (RT_FAILURE(rc)) 1208 1206 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.