Changeset 35848 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Feb 4, 2011 11:11:54 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 69845
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevPit-i8254.cpp
r35353 r35848 177 177 #ifdef IN_RING3 178 178 PDMBOTHCBDECL(int) pitIOPortSpeakerWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb); 179 static void pit_irq_timer_update(PITChannelState *s, uint64_t current_time, uint64_t now );179 static void pit_irq_timer_update(PITChannelState *s, uint64_t current_time, uint64_t now, bool in_timer); 180 180 #endif 181 181 RT_C_DECLS_END … … 307 307 Log(("pit_set_gate: restarting mode %d\n", s->mode)); 308 308 s->count_load_time = TMTimerGet(pTimer); 309 pit_irq_timer_update(s, s->count_load_time, s->count_load_time );309 pit_irq_timer_update(s, s->count_load_time, s->count_load_time, false); 310 310 } 311 311 break; … … 316 316 Log(("pit_set_gate: restarting mode %d\n", s->mode)); 317 317 s->count_load_time = s->u64ReloadTS = TMTimerGet(pTimer); 318 pit_irq_timer_update(s, s->count_load_time, s->count_load_time );318 pit_irq_timer_update(s, s->count_load_time, s->count_load_time, false); 319 319 } 320 320 /* XXX: disable/enable counting */ … … 331 331 s->count_load_time = s->u64ReloadTS = TMTimerGet(pTimer); 332 332 s->count = val; 333 pit_irq_timer_update(s, s->count_load_time, s->count_load_time );333 pit_irq_timer_update(s, s->count_load_time, s->count_load_time, false); 334 334 335 335 /* log the new rate (ch 0 only). */ … … 419 419 } 420 420 421 static void pit_irq_timer_update(PITChannelState *s, uint64_t current_time, uint64_t now )421 static void pit_irq_timer_update(PITChannelState *s, uint64_t current_time, uint64_t now, bool in_timer) 422 422 { 423 423 int64_t expire_time; … … 438 438 pDevIns = s->CTX_SUFF(pPit)->pDevIns; 439 439 440 if (EFFECTIVE_MODE(s->mode) == 2 )440 if (EFFECTIVE_MODE(s->mode) == 2 && in_timer) 441 441 { 442 /* We just flip-flop the irq level to save that extra timer call, which isn't generally required (we haven't served it for years). */ 442 /* We just flip-flop the irq level to save that extra timer call, which 443 * isn't generally required (we haven't served it for years). However, 444 * the pulse is only generated when running on the timer callback (and 445 * thus on the trailing edge of the output signal pulse). 446 */ 443 447 PDMDevHlpISASetIrq(pDevIns, s->irq, PDM_IRQ_LEVEL_FLIP_FLOP); 448 444 449 } else 445 450 PDMDevHlpISASetIrq(pDevIns, s->irq, irq_level); … … 896 901 STAM_PROFILE_ADV_START(&s->CTX_SUFF(pPit)->StatPITHandler, a); 897 902 Log(("pitTimer\n")); 898 pit_irq_timer_update(s, s->next_transition_time, TMTimerGet(pTimer) );903 pit_irq_timer_update(s, s->next_transition_time, TMTimerGet(pTimer), true); 899 904 STAM_PROFILE_ADV_STOP(&s->CTX_SUFF(pPit)->StatPITHandler, a); 900 905 }
Note:
See TracChangeset
for help on using the changeset viewer.