qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [7171] hpet: Fix emulation of HPET_TN_SETVAL (Jan Kiszka)
@ 2009-04-17 21:05 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2009-04-17 21:05 UTC (permalink / raw)
  To: qemu-devel

Revision: 7171
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7171
Author:   aliguori
Date:     2009-04-17 21:05:45 +0000 (Fri, 17 Apr 2009)
Log Message:
-----------
hpet: Fix emulation of HPET_TN_SETVAL (Jan Kiszka)

While Intel's spec is not that clear here, latest changes to Linux' HPET
code (commit c23e253e67c9d8a91a0ffa33c1f571a17f0a2403, "x86: hpet: stop
HPET_COUNTER when programming periodic mode") strongly suggest that
HPET_TN_SETVAL rather means: Set _both_ the comparator value and
register.

With this patch applied, I'm again able to boot 2.6.30-rc kernels as
they no longer panic like this (which was due to the comparator
register remaining 0):

ENABLING IO-APIC IRQs
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC
...trying to set up timer (IRQ0) through the 8259A ...
..... (found apic 0 pin 2) ...
....... failed.
...trying to set up timer as Virtual Wire IRQ...
..... failed.
...trying to set up timer as ExtINT IRQ...
..... failed :(.
Kernel panic - not syncing: IO-APIC + timer doesn't work! [...]

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Modified Paths:
--------------
    branches/stable_0_10/hw/hpet.c

Modified: branches/stable_0_10/hw/hpet.c
===================================================================
--- branches/stable_0_10/hw/hpet.c	2009-04-17 21:05:41 UTC (rev 7170)
+++ branches/stable_0_10/hw/hpet.c	2009-04-17 21:05:45 UTC (rev 7171)
@@ -411,7 +411,7 @@
                            (timer->config & HPET_TN_SETVAL))
                     timer->cmp = (timer->cmp & 0xffffffff00000000ULL)
                                   | new_val;
-                else {
+                if (timer_is_periodic(timer)) {
                     /*
                      * FIXME: Clamp period to reasonable min value?
                      * Clamp period to reasonable max value

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-17 21:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-17 21:05 [Qemu-devel] [7171] hpet: Fix emulation of HPET_TN_SETVAL (Jan Kiszka) Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).