From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiDI0-0004Og-CG for qemu-devel@nongnu.org; Wed, 07 May 2014 21:38:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WiDHs-0007fA-I7 for qemu-devel@nongnu.org; Wed, 07 May 2014 21:38:24 -0400 Received: from mail-qa0-x22a.google.com ([2607:f8b0:400d:c00::22a]:39035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiDHs-0007f5-Du for qemu-devel@nongnu.org; Wed, 07 May 2014 21:38:16 -0400 Received: by mail-qa0-f42.google.com with SMTP id j5so1918117qaq.1 for ; Wed, 07 May 2014 18:38:16 -0700 (PDT) From: "Edgar E. Iglesias" Date: Thu, 8 May 2014 11:35:07 +1000 Message-Id: <1399512908-23925-5-git-send-email-edgar.iglesias@gmail.com> In-Reply-To: <1399512908-23925-1-git-send-email-edgar.iglesias@gmail.com> References: <1399512908-23925-1-git-send-email-edgar.iglesias@gmail.com> Subject: [Qemu-devel] [PATCH v1 4/5] xilinx_timer: Fix writes into TCSR register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.crosthwaite@xilinx.com, linux@roeck-us.net From: Guenter Roeck The TCSR register has only 11 valid bits. This is now used by the linux kernel to auto-detect endianness, and causes Linux 3.15-rc1 and later to hang when run under qemu-microblaze. Mask valid bits before writing the register to solve the problem. Signed-off-by: Guenter Roeck Reviewed-by: Edgar E. Iglesias Signed-off-by: Edgar E. Iglesias --- hw/timer/xilinx_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c index 6113b97..3ff1da9 100644 --- a/hw/timer/xilinx_timer.c +++ b/hw/timer/xilinx_timer.c @@ -169,7 +169,7 @@ timer_write(void *opaque, hwaddr addr, if (value & TCSR_TINT) value &= ~TCSR_TINT; - xt->regs[addr] = value; + xt->regs[addr] = value & 0x7ff; if (value & TCSR_ENT) timer_enable(xt); break; -- 1.8.3.2