From owner-freebsd-emulation@FreeBSD.ORG Thu Oct 13 23:27:45 2005 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7243D16A41F; Thu, 13 Oct 2005 23:27:45 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07C7543D64; Thu, 13 Oct 2005 23:27:38 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j9DNPkS0078315; Thu, 13 Oct 2005 17:25:47 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 13 Oct 2005 17:26:55 -0600 (MDT) Message-Id: <20051013.172655.102656323.imp@bsdimp.com> To: nox@jelal.kn-bremen.de From: "M. Warner Losh" In-Reply-To: <20051013200254.GA11267@saturn.kn-bremen.de> References: <200510131210.55135.jkim@FreeBSD.org> <200510131428.21211.jkim@FreeBSD.org> <20051013200254.GA11267@saturn.kn-bremen.de> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 13 Oct 2005 17:25:52 -0600 (MDT) Cc: jcoombs@gwi.net, thierry@herbelot.com, freebsd-emulation@freebsd.org, freebsd-current@freebsd.org, bakul@BitBlocks.com, jkim@freebsd.org Subject: Re: Loss of ed(4) in a RC1 booted in qemu X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2005 23:27:45 -0000 In message: <20051013200254.GA11267@saturn.kn-bremen.de> Juergen Lock writes: : On Thu, Oct 13, 2005 at 02:28:18PM -0400, Jung-uk Kim wrote: : > On Thursday 13 October 2005 12:10 pm, Jung-uk Kim wrote: : > > QEMU emulates RTL8029: : > > : > > ed0: port 0xc100-0xc1ff irq 11 at device 3.0 on pci0 : > > ed0: Reserved 0x100 bytes for rid 0x10 type 4 at 0xc100 : > > : > > and Warner Losh MFC'd new ed(4) right before 6.0-RC1: : > > : > > http://docs.freebsd.org/cgi/mid.cgi?200510081800.j98I0fRI089493 : > > : > > The new driver does more aggressive probing and it seems QEMU : > > cannot handle it. : > : > Just for the time being, you can drop the attachment in : > ports/emulators/qemu/files directory and rebuild qemu to get ed(4) : > back. : > : > Jung-uk Kim : : >[patch snipped] : : Okay, we could add this as an option to our qemu port (`-ne2kvia' or : something like that), anyone thinks it is necessary? (I guess this : issue will be fixed in 6.0-R?) I've committed patches to -current to fix this problem. The fixes correct a minor botch in the probing code, while also adding tolerance for the RTL8029 that's claimed to be there to not really be there. I've posted patches to qemu that improves that RTL8029 emulation, but those aren't required for FreeBSD to work. RC1 won't work with qemu, patched or unpatched, due to the minor botch. RC2 and newer will have this problem fixed. The qemu folks can include and improve upon my patches as they see fit in the future. The problem with just switching to the VIA VT86C926 is that it isn't exactly like a NE-2000. According to its datasheet: >>7. CONTROL AND STATUS REGISTERS >>VT86C926 supports the control and status registers of DP8390 except >>those explained as follows. >> >> * VT86C926 supports all page 1 registers. Only part of Page 2 is >> supported. >> * VT86C926 supports Early Transmit Underrun (ETUN) >> * VT86C926 supports most of page 0 registers. >> * The meaning and use of 01H (CLAD0) and 02H (CLAD1) of page 0 is >> altered. >> * The 06H (FIFO port) of page 0 is not supported. >> * The following control/status bits in page 0 are not supported: >> -- (D3,D4,D5) == (0,1,1) of CR (00H) : Send Packet Command (RD0 - RD2) >> -- D1 of DCR: Byte Order Select (BOS) >> -- D2 of DCR: Long Address Select (LAS) >> -- D4 of DCR: Auto-initialize Remote (ARM) >> -- D5, D6 of DCR: FIFO Threshold Select (FT0 and FT1) >> -- D4 of TCR: Collision Offset Enable (OFST) >> -- D5 of TSR: FIFO Underrun (FU) >> -- D7 of TSR: Out of Window Collision (OWC) >> -- D3 of RSR: FIFO Overrun (FO) None of which are enshrined in hw/ne2000.c as far as I can tell. The early interrupt stuff isn't part of a NE2000 at all (that's the ETUN). Of course its datasheet is maddening. It talks about different bits and registers, but never defines their offsets or values! Warner