From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KZnl3-0001ZQ-J9 for qemu-devel@nongnu.org; Sun, 31 Aug 2008 10:18:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KZnl2-0001YX-FA for qemu-devel@nongnu.org; Sun, 31 Aug 2008 10:18:24 -0400 Received: from [199.232.76.173] (port=38018 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZnl2-0001YU-CD for qemu-devel@nongnu.org; Sun, 31 Aug 2008 10:18:24 -0400 Received: from il.qumranet.com ([212.179.150.194]:28297) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KZnl2-0003Yc-43 for qemu-devel@nongnu.org; Sun, 31 Aug 2008 10:18:24 -0400 Received: from gleb-debian.qumranet.com (gleb-debian.qumranet.com.qumranet.com [172.16.15.143]) by il.qumranet.com (Postfix) with ESMTP id 7B6D8250EDA for ; Sun, 31 Aug 2008 17:18:19 +0300 (IDT) Date: Sun, 31 Aug 2008 17:18:19 +0300 From: Gleb Natapov Subject: Re: [Qemu-devel] [PATCH v3 1/6] Use IO port for qemu<->guest BIOS communication. Message-ID: <20080831141819.GH6192@minantech.com> References: <20080828165232.22851.77678.stgit@gleb-debian.qumranet.com.qumranet.com> <20080828165237.22851.1532.stgit@gleb-debian.qumranet.com.qumranet.com> <20080829190041.GA18301@minantech.com> <20080831111206.GF6192@minantech.com> <20080831130256.GG6192@minantech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 With the fix below this patch series works for me. On Sun, Aug 31, 2008 at 04:39:34PM +0300, Blue Swirl wrote: > +static uint8_t fw_cfg_read(FWCfgState *s) > +{ > + int arch = !!(s->cur_entry & FW_CFG_ARCH_LOCAL); > + FWCfgEntry *e = &s->entries[arch][s->cur_entry & ~FW_CFG_ARCH_LOCAL]; > + uint8_t ret; > + > + if (s->cur_entry != FW_CFG_INVALID || !e->data || s->cur_offset >= e->len) This should be "==" ^^^ > + ret = 0; > + else > + ret = e->data[s->cur_offset++]; > + > + FW_CFG_DPRINTF("read %d\n", ret); > + > + return ret; > +} > + -- Gleb.