Received: from eggs.gnu.org ([140.186.70.92]:32935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRihH-0006H3-Cb for qemu-devel@nongnu.org; Wed, 01 Jun 2011 06:30:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRihE-000743-Pd for qemu-devel@nongnu.org; Wed, 01 Jun 2011 06:30:43 -0400 Received: from nm1.bullet.mail.sg1.yahoo.com ([115.178.12.223]:26167) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QRihD-00072u-Ci for qemu-devel@nongnu.org; Wed, 01 Jun 2011 06:30:40 -0400 Message-ID: <157760.37110.qm@web77918.mail.sg1.yahoo.com> References: <86111.23825.qm@web77915.mail.sg1.yahoo.com> <1068344C-018A-4AE7-8B6D-7DA416378430@suse.de> <790135.19996.qm@web77917.mail.sg1.yahoo.com> <20110601083653.GA25049@edde.se.axis.com> Date: Wed, 1 Jun 2011 18:30:36 +0800 (SGT) From: =?utf-8?B?TMOqIMSQ4bupYyBUw6Bp?= In-Reply-To: <20110601083653.GA25049@edde.se.axis.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1645489917-1306924236=:37110" Subject: Re: [Qemu-devel] QEMU for ppc440 on i386 host List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: Alexander Graf , "qemu-devel@nongnu.orgDevelopers" --0-1645489917-1306924236=:37110 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Jun 01, 2011 at 15:36, Edgar E. Iglesias wrote:=0A> On Wed, Jun 0= 1, 2011 at 03:03:18PM +0800, L=C3=AA =C4=90=E1=BB=A9c T=C3=A0i wrote:=0A> = > On 31.05.2011, at 23:52, Alexander Graf wrote:=0A> > > On 31.05.2= 011, at 18:05, L=C3=AA =C4=90=E1=BB=A9c T=C3=A0i wrote:=0A> > > >=0A> = > > > Hi!=0A> > > > My name is Tai.=0A> > > > Sorry for both= er you!=0A> > > >=0A> > > > I have a question about QEMU for powe= rpc.=0A> > > > Can QEMU emulate the ppc440 on a i386 host?=0A> > >= > I mean it is full-system emulation.=0A> > > > Because when I'm try= ing to run linux ppc440 with qemu on my i386 PC=0A> > > > I alway get = the error like that:=0A> > > >=0A> > > > $ qemu-system-ppc -M bam= boo -kernel vmlinux=0A> > > > qemu: fatal: Trying to execute code outs= ide RAM or ROM at =0A0xc0000000=0A> > > >=0A> > > > NIP c0000000 = LR 00000000 CTR 00000000 XER 00000000=0A> > > > MSR 00000000 HID0 000= 00300 HF 00000000 idx 0=0A> > > > Segmentation fault=0A> > > >= =0A> > > > $ qemu-system-ppc -M bamboo -kernel arch/powerpc/boot/uImag= e=0A> > > > Trying to read privileged spr 947 3b3 at 00001014=0A> > = > > Trying to read invalid spr 62 03e at 00000778=0A> > > >=0A> >= > > I using QEMU that configured and built with device tree support=0A>= > > > (enable libfdt).=0A> > > > QEMU version 0.14.1=0A> > >= > The kernel image is built for bamboo using powerpc-440 toolchain.=0A> = > > > kernel-version 2.6.38.2=0A> > >=0A> > > PPC440 emulation= support has only been added to Qemu very recently=0A> > > (0.14). So = far, the only board that is somewhat known to work is the=0A> > > virt= ex5 ml507 one with a 440x5 xilinx cpu. Please see=0A> > > [1]http://wi= ki.qemu.org/ChangeLog/0.14#PPC for details.=0A> > >=0A> > > The ba= mboo board was added to enable KVM support for 440, it hasn't=0A> > > = been used with the emulation target yet.=0A> > >=0A> > > What exac= tly are you trying to emulate?=0A> > >=0A> > >=0A> > > Alex=0A= > >=0A> > Thank for your answer.=0A> > I'm trying to emulate the = ppc440 on a i386 host.=0A> > My final target: Linux for PPC440 can run = on Qemu and drop a shell=0A> > prompt.=0A> > When I try to run this= command:=0A> > $ qemu-system-ppc -M ?=0A> > Supported machines are= :=0A> > virtex-ml507 Xilinx Virtex ML507 reference design=0A> > mpc= 8544ds mpc8544ds=0A> > bamboo bamboo (alias of bamboo-0.13)=0A> >= bamboo-0.13 bamboo=0A> > bamboo-0.12 bamboo=0A> > ref405ep ref4= 05ep=0A> > taihu taihu=0A> > mac99 Mac99 based PowerMAC= =0A> > g3beige Heathrow based PowerMAC (default)=0A> > prep = PowerPC PREP platform=0A> > I find two boards that have a PPC440 cpu: = virtex-ml507 and bamboo.=0A> > I have checked the bamboo board fist, th= en I get the result as above.=0A> > Hower, the ml507 board seems not wo= rking too.=0A> > I have built kernel image for Virtex ML507 using power= pc-440 toolchain.=0A> > kernel-version: linux-2.6.39=0A> > config: = 44x/virtex5_defconfig=0A> > When I'm trying to run:=0A> > $ qemu-sy= stem-ppc -M virtex-ml507 -kernel=0A> > arch/powerpc/boot/simpleImage.vi= rtex440-ml507.elf=0A> > I get the following output:=0A> > Unable to= get size of device tree file 'ppc.dtb'=0A> > Warning: vlan 0 with no n= ics=0A> > Qemu just display a monitor console, it seems not to be loadi= ng the=0A> > kernel.=0A> > Could you help me some ideas?=0A> > = Could you help me the guide to emulate virtex-ml507 on i368 host?=0A>=0A> = Hi,=0A>=0A> I've just uploaded a test image to the wiki's download pages= .=0A> See http://wiki.qemu.org/Download.=0A>=0A> You'll need a recent q= emu, built with libfdt support.=0A>=0A> I threw in the linux kernelconfig= used to build the image. I=0A> used a rather old version (2.6.34) of the= kernel provided by=0A> Xilinx at:=0A> git://git.xilinx.com/linux-2.6-x= lnx.git=0A> commit:=0A> 91e2c43452914a789a4bebea7c199695bbf888f2=0A>=0A= > My guess is that you should be able to build a kernel directly=0A> fr= om upstream, but I haven't tried.=0A>=0A> One thing to note is that qemu = still lacks support for the ll-temac=0A> (ethernet nic) and the kernel ha= ngs when probing for it. The workaround=0A> is to remove it from the devi= ce tree file (ppc.dtb). Already done in=0A> the archive with my test imag= e, but good to know if you start rolling=0A> your own stuff.=0A>=0A> Re= garding the ll-temac, we've got it running and plan to submit, I just=0A> = need to get some time to clean it up etc.. sorry.=0A>=0A> Good luck=0A>= =0AThank you.=0AI've just downloaded the test image from QEMU site.=0AThen = I run the qemu-run.sh script, it boot succesful.=0AI get a nice shell.=0A# = cat /proc/cpuinfo =0Aprocessor : 0=0Acpu : 440 in Virtex= -5 FXT=0Arevision : 25.16 (pvr 7ff2 1910)=0Abogomips : 800.00= =0Atimebase : 400000000=0Aplatform : Xilinx Virtex440=0Amodel= : testing=0AMemory : 256 MB=0A=0AThank for your support= one more.=0AI will get the Xilinx kernel and try to build it.=0A=0ATai --0-1645489917-1306924236=:37110 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Wed, Jun 01, 2011 at 15:36, Edgar E. Iglesias wrote:
>= ;   On Wed, Jun 01, 2011 at 03:03:18PM +0800, L=C3=AA =C4=90=E1= =BB=A9c T=C3=A0i wrote:
>   >   On 31.05.2011,= at 23:52, Alexander Graf wrote:
>   >   >&= nbsp; On 31.05.2011, at 18:05, L=C3=AA =C4=90=E1=BB=A9c T=C3=A0i wrote:
= >   >   >  >
>   >&= nbsp;  >  > Hi!
>   >   >&n= bsp; > My name is Tai.
>   >   >  &= gt; Sorry for bother you!
>   >   >  &= gt;
>   >   >  > I have a question = about QEMU for powerpc.
>   >   >  >= ; Can QEMU emulate the ppc440 on a i386 host?
>   >   >  > I mean it = is full-system emulation.
>   >   >  &= gt; Because when I'm trying to run linux ppc440 with qemu on my i386 PC
= >   >   >  > I alway get the error lik= e that:
>   >   >  >
> &= nbsp; >   >  > $ qemu-system-ppc -M bamboo -kernel = vmlinux
>   >   >  > qemu: fatal: T= rying to execute code outside RAM or ROM at 0xc0000000
>   = >   >  >
>   >   >&= nbsp; > NIP c0000000  LR 00000000 CTR 00000000 XER 00000000
>=    >   >  > MSR 00000000 HID0 00000300&nb= sp; HF 00000000 idx 0
>   >   >  > = Segmentation fault
>   >   >  >
>   >   >  > $ qemu-system-pp= c -M bamboo -kernel arch/powerpc/boot/uImage
>   > =   >  > Trying to read privileged spr 947 3b3 at 00001014>   >   >  > Trying to read invalid s= pr 62 03e at 00000778
>   >   >  ><= br>>   >   >  > I using QEMU that conf= igured and built with device tree support
>   > &nb= sp; >  > (enable libfdt).
>   >   &= gt;  > QEMU version 0.14.1
>   >   >= ;  > The kernel image is built for bamboo using powerpc-440 toolcha= in.
>   >   >  > kernel-version 2.6= .38.2
>   >   >
>   >&nb= sp;  >  PPC440 emulation support has only been added to Qemu very recently
>   >   >  (0.14).= So far, the only board that is somewhat known to work is the
> =   >   >  virtex5 ml507 one with a 440x5 xilinx cp= u. Please see
>   >   >  [1]http://wi= ki.qemu.org/ChangeLog/0.14#PPC for details.
>   = >   >
>   >   >  The b= amboo board was added to enable KVM support for 440, it hasn't
> = ;  >   >  been used with the emulation target yet= .
>   >   >
>   > &= nbsp; >  What exactly are you trying to emulate?
>  = ; >   >
>   >   >
>&n= bsp;  >   >  Alex
>   >
>   >   Thank for your answer.
>&n= bsp;  >   I'm trying to emulate the ppc440 on a i386 host= .
>   >   My final target: Linux for PPC440 ca= n run on Qemu and drop a shell
>   >   prompt.=
>   >   When I try to run this command:
&g= t;   >   $ qemu-system-ppc -M ?
>   = >   Supported machines are:
>   > &nbs= p; virtex-ml507 Xilinx Virtex ML507 reference design
>   &g= t;   mpc8544ds  mpc8544ds
>   > &nbs= p; bamboo    bamboo (alias of bamboo-0.13)
> &nbs= p; >   bamboo-0.13 bamboo
>   >  = bamboo-0.12 bamboo
>   >   ref405ep  ref= 405ep
>   >   taihu      taihu
>   > &n= bsp; mac99      Mac99 based PowerMAC
> =   >   g3beige    Heathrow based PowerMAC (= default)
>   >   prep    &= nbsp; PowerPC PREP platform
>   >   I find two= boards that have a PPC440 cpu: virtex-ml507 and bamboo.
>  = ; >   I have checked the bamboo board fist, then I get the res= ult as above.
>   >   Hower, the ml507 board s= eems not working too.
>   >   I have built ker= nel image for Virtex ML507 using powerpc-440 toolchain.
>  = >   kernel-version: linux-2.6.39
>   >&nbs= p;  config: 44x/virtex5_defconfig
>   >  = When I'm trying to run:
>   >   $ qemu-system-ppc -M virtex-ml507 -kernel
>   > &nbs= p; arch/powerpc/boot/simpleImage.virtex440-ml507.elf
>   &g= t;   I get the following output:
>   > &n= bsp; Unable to get size of device tree file 'ppc.dtb'
>   &= gt;   Warning: vlan 0 with no nics
>   > =   Qemu just display a monitor console, it seems not to be loading the<= br>>   >   kernel.
>   > =   Could you help me some ideas?
>   >   C= ould you help me the guide to emulate virtex-ml507 on i368 host?
>>   Hi,
>
>   I've just uploaded a test= image to the wiki's download pages.
>   See http://wiki.qemu.org/Do= wnload.
>
>   You'll need a recent qemu, built with libfdt support.
>
>   I threw in th= e linux kernelconfig used to build the image. I
>   used a = rather old version (2.6.34) of the kernel provided by
>   X= ilinx at:
>   git://git.xilinx.com/linux-2.6-xlnx.git
&g= t;   commit:
>   91e2c43452914a789a4bebea7c199695= bbf888f2
>
>   My guess is that you should be able to= build a kernel directly
>   from upstream, but I haven't t= ried.
>
>   One thing to note is that qemu still lack= s support for the ll-temac
>   (ethernet nic) and the kerne= l hangs when probing for it. The workaround
>   is to remov= e it from the device tree file (ppc.dtb). Already done in
> &nbs= p; the archive with my test image, but good to know if you start rolling>   your own stuff.
>
>   Regarding the ll-temac, we've got it running and plan to submit, I just>   need to get some time to clean it up etc.. sorry.
>=
>   Good luck
>
Thank you.
I've just downloade= d the test image from QEMU site.
Then I run the qemu-run.sh script, it b= oot succesful.
I get a nice shell.
# cat /proc/cpuinfo  
proc= essor       : 0
cpu    = ;         : 440 in Virtex-5 FXT
= revision        : 25.16 (pvr 7ff2 1910)<= br>bogomips        : 800.00
timebase&= nbsp;       : 400000000
platform &nbs= p;      : Xilinx Virtex440
model  &nb= sp;        : testing
Memory &nbs= p;        : 256 MB

Thank for your support one more.
I will get the Xilinx kernel and try to buil= d it.

Tai
--0-1645489917-1306924236=:37110--