qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] [SPARC] SlavIO Counter-Timers fix


From: Aurelien Jarno
Subject: [Qemu-devel] [PATCH] [SPARC] SlavIO Counter-Timers fix
Date: Sat, 17 Mar 2007 15:17:32 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hi all,

Currently, the time on the SPARC sun4m target running Linux goes about
30% too fast. 

This is due to a bug in the SlavIO Counter-Timers emulation. When in 
system mode the counter must be reset when a new limit is written, but 
*not* when the current limit is read (which also clears the interrupt).

The patch below fixes that.

Bye,
Aurelien

Index: hw/slavio_timer.c
===================================================================
RCS file: /sources/qemu/qemu/hw/slavio_timer.c,v
retrieving revision 1.4
diff -u -d -p -r1.4 slavio_timer.c
--- hw/slavio_timer.c   25 Jun 2006 18:15:31 -0000      1.4
+++ hw/slavio_timer.c   17 Mar 2007 14:07:31 -0000
@@ -131,7 +131,6 @@ static uint32_t slavio_timer_mem_readl(v
        if (s->mode != 1) {
            // clear irq
            pic_set_irq_cpu(s->irq, 0, s->cpu);
-           s->count_load_time = qemu_get_clock(vm_clock);
            s->reached = 0;
            return s->limit;
        }

-- 
  .''`.  Aurelien Jarno             | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   address@hidden         | address@hidden
   `-    people.debian.org/~aurel32 | www.aurel32.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]