From: Jack Lange Date: Mon, 16 Feb 2009 17:26:20 +0000 (-0600) Subject: fixed timing bug X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=22e5122c2abd2e2b0a9ce5c5448fc36d294cfcca;p=palacios-OLD.git fixed timing bug --- diff --git a/palacios/src/devices/8254.c b/palacios/src/devices/8254.c index fa51251..f0c063b 100644 --- a/palacios/src/devices/8254.c +++ b/palacios/src/devices/8254.c @@ -255,7 +255,7 @@ static void pit_update_time(ullong_t cpu_cycles, ullong_t cpu_freq, void * priva if (cpu_cycles > state->pit_reload) { // how many full oscillations - // PrintError("cpu_cycles = %p, reload = %p...\n", + //PrintError("cpu_cycles = %p, reload = %p...\n", // (void *)(addr_t)cpu_cycles, // (void *)(addr_t)state->pit_reload); @@ -268,8 +268,8 @@ static void pit_update_time(ullong_t cpu_cycles, ullong_t cpu_freq, void * priva #ifdef __V3_64BIT__ - cpu_cycles = tmp_cycles / state->pit_reload; - tmp_cycles = tmp_cycles % state->pit_reload; + cpu_cycles = tmp_cycles % state->pit_reload; + tmp_cycles = tmp_cycles / state->pit_reload; #else cpu_cycles = do_divll(tmp_cycles, state->pit_reload); #endif