From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNwP9-0003Yu-6o for qemu-devel@nongnu.org; Fri, 16 Jan 2009 16:39:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNwP8-0003XD-8S for qemu-devel@nongnu.org; Fri, 16 Jan 2009 16:39:02 -0500 Received: from [199.232.76.173] (port=47038 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNwP8-0003Wo-1M for qemu-devel@nongnu.org; Fri, 16 Jan 2009 16:39:02 -0500 Received: from savannah.gnu.org ([199.232.41.3]:57379 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LNwP7-00009a-5O for qemu-devel@nongnu.org; Fri, 16 Jan 2009 16:39:01 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LNwP5-0005f8-EQ for qemu-devel@nongnu.org; Fri, 16 Jan 2009 21:38:59 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LNwP5-0005f4-7H for qemu-devel@nongnu.org; Fri, 16 Jan 2009 21:38:59 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Fri, 16 Jan 2009 21:38:59 +0000 Subject: [Qemu-devel] [6357] hpet config mask fix Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6357 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6357 Author: aurel32 Date: 2009-01-16 21:38:58 +0000 (Fri, 16 Jan 2009) Log Message: ----------- 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) Modified Paths: -------------- trunk/hw/hpet.c trunk/hw/hpet_emul.h Modified: trunk/hw/hpet.c =================================================================== --- trunk/hw/hpet.c 2009-01-16 21:13:58 UTC (rev 6356) +++ trunk/hw/hpet.c 2009-01-16 21:38:58 UTC (rev 6357) @@ -388,7 +388,8 @@ 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 @@ 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) Modified: trunk/hw/hpet_emul.h =================================================================== --- trunk/hw/hpet_emul.h 2009-01-16 21:13:58 UTC (rev 6356) +++ trunk/hw/hpet_emul.h 2009-01-16 21:38:58 UTC (rev 6357) @@ -36,6 +36,7 @@ #define HPET_TN_CFG 0x000 #define HPET_TN_CMP 0x008 #define HPET_TN_ROUTE 0x010 +#define HPET_CFG_WRITE_MASK 0x3 #define HPET_TN_ENABLE 0x004 @@ -45,6 +46,7 @@ #define HPET_TN_SETVAL 0x040 #define HPET_TN_32BIT 0x100 #define HPET_TN_INT_ROUTE_MASK 0x3e00 +#define HPET_TN_CFG_WRITE_MASK 0x3f4e #define HPET_TN_INT_ROUTE_SHIFT 9 #define HPET_TN_INT_ROUTE_CAP_SHIFT 32 #define HPET_TN_CFG_BITS_READONLY_OR_RESERVED 0xffff80b1U