Reset HPET config register on hpet_reset
authorBeth Kon <eak@us.ibm.com>
Mon, 13 Jul 2009 23:43:13 +0000 (19:43 -0400)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 16 Jul 2009 22:28:50 +0000 (17:28 -0500)
Without this, after system reset, hpet does not detect transition from
non-legacy to legacy mode.

Signed-off-by: Beth Kon <eak@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/hpet.c

index 3873f4c8502ac2efbfcc663ffeec931dd36069c5..24aee6a2cc0a372869f0b397636ea5f9a3dcc857 100644 (file)
--- a/hw/hpet.c
+++ b/hw/hpet.c
@@ -553,6 +553,7 @@ static void hpet_reset(void *opaque) {
     /* 64-bit main counter; 3 timers supported; LegacyReplacementRoute. */
     s->capability = 0x8086a201ULL;
     s->capability |= ((HPET_CLK_PERIOD) << 32);
+    s->config = 0ULL;
     if (count > 0)
         /* we don't enable pit when hpet_reset is first called (by hpet_init)
          * because hpet is taking over for pit here. On subsequent invocations,