HPET fixes for reg writes
commitb87d79698d04bc472d2847d9a1d209985b99f8a4
authorBeth Kon <eak@us.ibm.com>
Fri, 24 Jul 2009 16:26:59 +0000 (24 12:26 -0400)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 29 Jul 2009 16:38:06 +0000 (29 11:38 -0500)
treec18642d68c163f998ef0119a456f253d3def0796
parentb0dc78730e54bd3ef96f56466890aa2509a328c3
HPET fixes for reg writes

This patch addresses the problems found by Andriy Gapon:

- The code was incorrectly overwriting the high order 32
  bits of the timer and hpet config registers. This didn't show up
  in testing because linux and windows use hpet in legacy mode,
  where the high order 32 bits (advertising available interrupts)
  of the timer config register are ignored, and the high order 32
  bits of the hpet config register are reserved and unused.

- The mask for level-triggered interrupts was off by a bit. (hpet
  doesn't currently support level-triggered interrupts).

In addition, I removed some unused #defines, and corrected the ioapic
interrupt values advertised. I'd set this up early in hpet development
and never went back to correct it, and no bugs resulted since linux and
windows use hpet in legacy mode where available interrupts are ignored.

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