From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPye1-0005Cz-VE for qemu-devel@nongnu.org; Mon, 14 Nov 2011 10:40:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPydx-0004sJ-7A for qemu-devel@nongnu.org; Mon, 14 Nov 2011 10:40:25 -0500 Received: from mail-ww0-f53.google.com ([74.125.82.53]:32814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPydw-0004sB-VN for qemu-devel@nongnu.org; Mon, 14 Nov 2011 10:40:21 -0500 Received: by wwf27 with SMTP id 27so3687734wwf.10 for ; Mon, 14 Nov 2011 07:40:20 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <18d8a7431850a16a7b49ce4fac4b34606c963f47.1321207953.git.julian.pidancet@gmail.com> Date: Mon, 14 Nov 2011 15:40:20 +0000 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] rtl8139: Fix invalid IO access alignment List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Julian Pidancet Cc: qemu-devel@nongnu.org On Mon, Nov 14, 2011 at 2:46 PM, Julian Pidancet wrote: > On Mon, Nov 14, 2011 at 2:38 PM, Stefan Hajnoczi wro= te: >> On Sun, Nov 13, 2011 at 6:13 PM, Julian Pidancet >> wrote: >>> This patch makes iPXE work with the rtl8139 emulation. The rtl8139 >>> driver in iPXE issues a 16bit access on the ChipCmd register >>> (offset 0x37) to check the status of the rx buffer. The offset of the >>> ioport access was getting fixed up to 0x36 in qemu, causing the value >>> read in iPXE to be invalid. >>> >>> This fixes an issue with iPXE reporting timeouts during TFTP transfers. >>> >>> Signed-off-by: Julian Pidancet >>> --- >>> =A0hw/rtl8139.c | =A0 10 +++++----- >>> =A01 files changed, 5 insertions(+), 5 deletions(-) >> >> I checked the datasheet and the register byte at 0x38, after ChipCmd, >> is undocumented. =A0iPXE is being weird, I don't see the reason for the >> inw(). >> > > I agree, changing this inw() to an inb() in iPXE also fixes the issue. > But this patch makes more sense because it reflects how real hardware > would behave. Yep, we need to support real-world (weird) software. Sending a patch to iPXE is good, but QEMU should work with existing iPXE builds. Stefan