]> git.proxmox.com Git - qemu.git/commit
HPET fixes for reg writes
authorBeth Kon <eak@us.ibm.com>
Fri, 24 Jul 2009 16:26:59 +0000 (12:26 -0400)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 27 Jul 2009 19:08:23 +0000 (14:08 -0500)
commitce536cfd1c33bf1a59a02436a025ddc7ef3a63b6
tree5476332d116224bfb12a5e470ebe9a67b4774185
parentbb53fc5394201c0cbe3c89a1c9fa5fbd6a3b832c
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