From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BFIKO-0000lu-CE for qemu-devel@nongnu.org; Sun, 18 Apr 2004 15:51:44 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BFIJr-0000ct-G7 for qemu-devel@nongnu.org; Sun, 18 Apr 2004 15:51:42 -0400 Received: from [62.210.158.41] (helo=moscou.magic.fr) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BFIJq-0000al-6y for qemu-devel@nongnu.org; Sun, 18 Apr 2004 15:51:10 -0400 Received: from [10.0.0.2] (ppp-181.net-555.magic.fr [62.210.255.181]) by moscou.magic.fr (8.11.6/8.10.1) with ESMTP id i3IJp3206000 for ; Sun, 18 Apr 2004 21:51:03 +0200 (CEST) Subject: Re: [Qemu-devel] PPC emulation, how? From: "J. Mayer" In-Reply-To: <1082137461.24066.376.camel@jma1.dev.netgem.com> References: <1081879720.639650.64402.zmail@web1.zwallet.com> <1081882610.13140.185.camel@jma1.dev.netgem.com> <407D49CE.5090900@olifantasia.com> <1082137461.24066.376.camel@jma1.dev.netgem.com> Content-Type: text/plain Message-Id: <1082317870.28998.22.camel@rapid> Mime-Version: 1.0 Date: Sun, 18 Apr 2004 21:51:10 +0200 Content-Transfer-Encoding: 7bit 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 On Fri, 2004-04-16 at 19:44, Jocelyn Mayer wrote: > Hi, sorry for the delay... > > > I tried your kernel image and debian install disk. > > It does boot but I can't get networking to work > > I can set the eth0 of the emulated client to 172.20.0.2 but am unable to > > ping the host (which is setup at 172.20.0.1 by /etc/qemu-ifup.sh) or the > > other way around. > > Is networking not working at all yet or am I missing something > > > > It may not work: I didn't really test the network, just made sure that > the NE2000 was seen by the kernel. PPC system emulation is still very > experimental... Here's a little patch in NE2000 emulation that makes network available for PPC: I can now ping my host machine, but failed to mount nfs exports... Index: hw/ne2000.c =================================================================== RCS file: /cvsroot/qemu/qemu/hw/ne2000.c,v retrieving revision 1.5 diff -u -d -w -B -b -d -p -r1.5 ne2000.c --- hw/ne2000.c 12 Apr 2004 20:39:29 -0000 1.5 +++ hw/ne2000.c 18 Apr 2004 19:47:23 -0000 @@ -368,8 +368,13 @@ static void ne2000_asic_ioport_write(voi p = s->mem + s->rsar; if (s->dcfg & 0x01) { /* 16 bit access */ +#ifdef TARGET_WORDS_BIGENDIAN + p[1] = val; + p[0] = val >> 8; +#else p[0] = val; p[1] = val >> 8; +#endif s->rsar += 2; s->rcnt -= 2; } else { @@ -397,7 +402,11 @@ static uint32_t ne2000_asic_ioport_read( p = s->mem + s->rsar; if (s->dcfg & 0x01) { /* 16 bit access */ +#ifdef TARGET_WORDS_BIGENDIAN + ret = p[1] | (p[0] << 8); +#else ret = p[0] | (p[1] << 8); +#endif s->rsar += 2; s->rcnt -= 2; } else { -- J. Mayer Never organized