On Mon, Nov 14, 2011 at 2:46 PM, Julian Pidancet <julian.pidan...@gmail.com> wrote: > On Mon, Nov 14, 2011 at 2:38 PM, Stefan Hajnoczi <stefa...@gmail.com> wrote: >> On Sun, Nov 13, 2011 at 6:13 PM, Julian Pidancet >> <julian.pidan...@gmail.com> 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 <julian.pidan...@gmail.com> >>> --- >>> hw/rtl8139.c | 10 +++++----- >>> 1 files changed, 5 insertions(+), 5 deletions(-) >> >> I checked the datasheet and the register byte at 0x38, after ChipCmd, >> is undocumented. iPXE 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