summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2010-06-13 14:15:39 +0200
committerBlue Swirl <blauwirbel@gmail.com>2010-06-13 15:32:59 +0300
commit9cec89e8db494df43faf242a5a030bc6540c89dd (patch)
tree71d84263895de95d49e32cf12c2e830289bc7d18 /hw
parent822557eb8ea4694d1a91b68cbf6152f5277f5599 (diff)
downloadqemu-9cec89e8db494df43faf242a5a030bc6540c89dd.tar.gz
qemu-9cec89e8db494df43faf242a5a030bc6540c89dd.tar.bz2
qemu-9cec89e8db494df43faf242a5a030bc6540c89dd.zip
hpet: Start/stop timer when HPET_TN_ENABLE is modified
We have to update the qemu timer when the per-timer enable bit is toggled, just like for HPET_CFG_ENABLE changes. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/hpet.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/hpet.c b/hw/hpet.c
index 6974935739..041dd84cfd 100644
--- a/hw/hpet.c
+++ b/hw/hpet.c
@@ -430,6 +430,11 @@ static void hpet_ram_writel(void *opaque, target_phys_addr_t addr,
printf("qemu: level-triggered hpet not supported\n");
exit (-1);
}
+ if (activating_bit(old_val, new_val, HPET_TN_ENABLE)) {
+ hpet_set_timer(timer);
+ } else if (deactivating_bit(old_val, new_val, HPET_TN_ENABLE)) {
+ hpet_del_timer(timer);
+ }
break;
case HPET_TN_CFG + 4: // Interrupt capabilities
DPRINTF("qemu: invalid HPET_TN_CFG+4 write\n");