From owner-freebsd-current@FreeBSD.ORG Thu Oct 13 22:36:11 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43DF616A41F for ; Thu, 13 Oct 2005 22:36:11 +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 D347F43D45 for ; Thu, 13 Oct 2005 22:36:10 +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 j9DMZdR9077910; Thu, 13 Oct 2005 16:35:39 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 13 Oct 2005 16:36:47 -0600 (MDT) Message-Id: <20051013.163647.106822892.imp@bsdimp.com> To: thierry@herbelot.com From: "M. Warner Losh" In-Reply-To: <200510132251.00632.thierry@herbelot.com> References: <200510131859.03307.thierry@herbelot.com> <20051013.135851.02300147.imp@bsdimp.com> <200510132251.00632.thierry@herbelot.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Thu_Oct_13_16:36:47_2005_831)--" 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 16:35:39 -0600 (MDT) Cc: freebsd-current@freebsd.org Subject: Re: Loss of ed(4) in a RC1 booted in qemu X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2005 22:36:11 -0000 ----Next_Part(Thu_Oct_13_16:36:47_2005_831)-- Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable In message: <200510132251.00632.thierry@herbelot.com> Thierry Herbelot writes: : Le Thursday 13 October 2005 21:58, M. Warner Losh a =E9crit : : > : > I'll be fixing this in the next day or three and it will be MFC'd f= rom : > head into RC2 when that happens. I'm not sure where the snapshots : > are, but there's a patch floating around to get around the qemu iss= ue : > just posted if you can't wait. I plan on trying it now with RC1. = I : > also plan on looking into the ne2000.c emulation to see why things = are : > failing (eg, is it a flaw in the RTL8029 emulation, or a flaw in if= _ed : > somewhere). : = : Great ! I'll try the patch ASAP I've committed changes to -current to work on patched and unpatched versions of qemu. Here's my patches to qemu to implement the RTL8029 specific registers. Place them in files/patch-hw::ne2000.c of the emulators/qemu port. Warner ----Next_Part(Thu_Oct_13_16:36:47_2005_831)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-hw::ne2000.c" --- hw/ne2000.c~ Thu Oct 13 16:33:39 2005 +++ hw/ne2000.c Thu Oct 13 16:33:47 2005 @@ -47,7 +47,9 @@ #define EN0_CRDAHI 0x09 /* high byte, current remote dma address RD */ #define EN0_RSARHI 0x09 /* Remote start address reg 1 */ #define EN0_RCNTLO 0x0a /* Remote byte count reg WR */ +#define EN0_RTL8029ID0 0x0a /* Realtek ID byte #1 RD */ #define EN0_RCNTHI 0x0b /* Remote byte count reg WR */ +#define EN0_RTL8029ID1 0x0b /* Realtek ID byte #2 RD */ #define EN0_RSR 0x0c /* rx status reg RD */ #define EN0_RXCR 0x0c /* RX configuration reg WR */ #define EN0_TXCR 0x0d /* TX configuration reg WR */ @@ -64,6 +66,11 @@ #define EN2_STARTPG 0x21 /* Starting page of ring bfr RD */ #define EN2_STOPPG 0x22 /* Ending page +1 of ring bfr RD */ +#define EN3_CONFIG0 0x33 +#define EN3_CONFIG1 0x34 +#define EN3_CONFIG2 0x35 +#define EN3_CONFIG3 0x36 + /* Register accessed at EN_CMD, the 8390 base addr. */ #define E8390_STOP 0x01 /* Stop and reset the chip */ #define E8390_START 0x02 /* Start the chip, clear reset */ @@ -385,6 +392,21 @@ case EN2_STOPPG: ret = s->stop >> 8; break; + case EN0_RTL8029ID0: + ret = 0x50; + break; + case EN0_RTL8029ID1: + ret = 0x43; + break; + case EN3_CONFIG0: + ret = 0; /* 10baseT media */ + break; + case EN3_CONFIG2: + ret = 0x40; /* 10baseT active */ + break; + case EN3_CONFIG3: + ret = 0x40; /* Full duplex */ + break; default: ret = 0x00; break; ----Next_Part(Thu_Oct_13_16:36:47_2005_831)----