qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] PPC emulation, how?


From: J. Mayer
Subject: Re: [Qemu-devel] PPC emulation, how?
Date: Sun, 18 Apr 2004 21:51:10 +0200

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 <address@hidden>
Never organized





reply via email to

[Prev in Thread] Current Thread [Next in Thread]