Ticket #2393 (closed defect: duplicate)

Opened 10 years ago

Last modified 8 years ago

Timer stalls in mode 2

Reported by: ncafferkey Owned by:
Priority: major Component: other
Version: VirtualBox 2.0.2 Keywords: timer PIT
Cc: Guest type: other
Host type: Mac OS X


When the emulated timer runs in mode 2, it counts down from its initial value to 1, but does not then reload the initial value. Instead, it stays at 1.

This behaviour prevents AROS ( from booting under VBox.

This is the code used by AROS to initialise the timer:

/* Start the timer2 */
outb((inb(0x61) & 0xfd) | 1, 0x61); /* Enable the timer (set GATE on) */
outb(0xb4, 0x43); /* Binary mode on Timer2, count mode 2 */
outb(0x00, 0x42); /* We're counting whole range */
outb(0x00, 0x42);

And this is the code used to read the timer's value:

/* Latch the current time value */
outb(0x80, 0x43);

/* Read out current 16-bit time */
time = inb(0x42);
time += inb(0x42) << 8;

This works on real machines and on several other emulators. I don't know if it's much different from what other OSs do.

Change History

comment:1 Changed 9 years ago by michaln

  • Status changed from new to closed
  • Resolution set to duplicate

This is a duplicate of #916.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use