浏览代码

Reset HPET config register on hpet_reset

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>
Beth Kon 16 年之前
父节点
当前提交
ca888361bb
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      hw/hpet.c

+ 1 - 0
hw/hpet.c

@@ -554,6 +554,7 @@ static void hpet_reset(void *opaque) {
     /* 64-bit main counter; 3 timers supported; LegacyReplacementRoute. */
     /* 64-bit main counter; 3 timers supported; LegacyReplacementRoute. */
     s->capability = 0x8086a201ULL;
     s->capability = 0x8086a201ULL;
     s->capability |= ((HPET_CLK_PERIOD) << 32);
     s->capability |= ((HPET_CLK_PERIOD) << 32);
+    s->config = 0ULL;
     if (count > 0)
     if (count > 0)
         /* we don't enable pit when hpet_reset is first called (by hpet_init)
         /* 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,
          * because hpet is taking over for pit here. On subsequent invocations,