summaryrefslogtreecommitdiff
path: root/hw/hpet.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-16 21:38:58 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-16 21:38:58 +0000
commit35730fa05511cfbf19341aedf8bfd526dfc7d90f (patch)
tree76e18f36aba091be78394a7e6adada7c6c708937 /hw/hpet.c
parent0add30cff44d681d0490b167e666c39d4d7b1e8d (diff)
downloadqemu-35730fa05511cfbf19341aedf8bfd526dfc7d90f.tar.gz
hpet config mask fix
I discovered a bug in the hpet code that caused Windows to boot without hpet. The config mask I was using was preventing the guest from placing the hpet into 32 bit mode. (Beth Kon) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6357 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/hpet.c')
-rw-r--r--hw/hpet.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/hpet.c b/hw/hpet.c
index 5c1aca2530..7df2d0515a 100644
--- a/hw/hpet.c
+++ b/hw/hpet.c
@@ -388,7 +388,8 @@ static void hpet_ram_writel(void *opaque, target_phys_addr_t addr,
switch ((addr - 0x100) % 0x20) {
case HPET_TN_CFG:
dprintf("qemu: hpet_ram_writel HPET_TN_CFG\n");
- timer->config = hpet_fixup_reg(new_val, old_val, 0x3e4e);
+ timer->config = hpet_fixup_reg(new_val, old_val,
+ HPET_TN_CFG_WRITE_MASK);
if (new_val & HPET_TN_32BIT) {
timer->cmp = (uint32_t)timer->cmp;
timer->period = (uint32_t)timer->period;
@@ -456,7 +457,8 @@ static void hpet_ram_writel(void *opaque, target_phys_addr_t addr,
case HPET_ID:
return;
case HPET_CFG:
- s->config = hpet_fixup_reg(new_val, old_val, 0x3);
+ s->config = hpet_fixup_reg(new_val, old_val,
+ HPET_CFG_WRITE_MASK);
if (activating_bit(old_val, new_val, HPET_CFG_ENABLE)) {
/* Enable main counter and interrupt generation. */
s->hpet_offset = ticks_to_ns(s->hpet_counter)