On Wed, Jun 01, 2011 at 15:36, Edgar E. Iglesias wrote:
> On Wed, Jun 01, 2011 at 03:03:18PM +0800, Lê Đức Tài wrote:
> > On 31.05.2011, at 23:52, Alexander Graf wrote:
> > > On 31.05.2011, at 18:05, Lê Đức Tài wrote:
> > > >
> > > > Hi!
> > > > My name is Tai.
> > > > Sorry for bother you!
> > > >
> > > > I have a question about QEMU for powerpc.
> > > > Can QEMU emulate the ppc440 on a
i386 host?
> > > > I mean it is full-system emulation.
> > > > Because when I'm trying to run linux ppc440 with qemu on my i386 PC
> > > > I alway get the error like that:
> > > >
> > > > $ qemu-system-ppc -M bamboo -kernel vmlinux
> > > > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0000000
> > > >
> > > > NIP c0000000 LR 00000000 CTR 00000000 XER 00000000
> > > > MSR 00000000 HID0 00000300 HF 00000000 idx 0
> > > > Segmentation fault
> > >
>
> > > > $ qemu-system-ppc -M bamboo -kernel arch/powerpc/boot/uImage
> > > > Trying to read privileged spr 947 3b3 at 00001014
> > > > Trying to read invalid spr 62 03e at 00000778
> > > >
> > > > I using QEMU that configured and built with device tree support
> > > > (enable libfdt).
> > > > QEMU version 0.14.1
> > > > The kernel image is built for bamboo using powerpc-440 toolchain.
> > > > kernel-version 2.6.38.2
> > >
> > > 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 cpu. Please see
> > > [1]http://wiki.qemu.org/ChangeLog/0.14#PPC for details.> > >
> > > The bamboo board was added to enable KVM support for 440, it hasn't
> > > been used with the emulation target yet.
> > >
> > > What exactly are you trying to emulate?
> > >
> > >
> > > Alex
>
>
> > Thank for your answer.
> > I'm trying to emulate the ppc440 on a i386 host.
> > My final target: Linux for PPC440 can run on Qemu and drop a shell
> > prompt.
> > When I try to run this command:
> > $ qemu-system-ppc -M ?
> > Supported machines are:
> > virtex-ml507 Xilinx Virtex ML507 reference design
> > mpc8544ds mpc8544ds
> > bamboo bamboo (alias of bamboo-0.13)
> > bamboo-0.13 bamboo
> > bamboo-0.12 bamboo
> > ref405ep ref405ep
> >
taihu taihu
> > mac99 Mac99 based PowerMAC
> > g3beige Heathrow based PowerMAC (default)
> > prep 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 result as above.
> > Hower, the ml507 board seems not working too.
> > I have built kernel image for Virtex ML507 using powerpc-440 toolchain.
> > kernel-version: linux-2.6.39
> > config: 44x/virtex5_defconfig
> > When I'm trying to run:
> > $
qemu-system-ppc -M virtex-ml507 -kernel
> > arch/powerpc/boot/simpleImage.virtex440-ml507.elf
> > I get the following output:
> > Unable to get size of device tree file 'ppc.dtb'
> > Warning: vlan 0 with no nics
> > Qemu just display a monitor console, it seems not to be loading the
> > kernel.
> > Could you help me some ideas?
> > Could 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/Download.>
> You'll need a recent
qemu, built with libfdt support.
>
> I threw in the linux kernelconfig used to build the image. I
> used a rather old version (2.6.34) of the kernel provided by
> Xilinx at:
> git://git.xilinx.com/linux-2.6-xlnx.git
> commit:
> 91e2c43452914a789a4bebea7c199695bbf888f2
>
> My guess is that you should be able to build a kernel directly
> from upstream, but I haven't tried.
>
> One thing to note is that qemu still lacks support for the ll-temac
> (ethernet nic) and the kernel hangs when probing for it. The workaround
> is to remove it from the device tree file (ppc.dtb). Already done in
> 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 downloaded the test image from QEMU site.
Then I run the qemu-run.sh script, it boot succesful.
I get a nice shell.
# cat /proc/cpuinfo
processor : 0
cpu : 440 in Virtex-5 FXT
revision : 25.16 (pvr 7ff2 1910)
bogomips : 800.00
timebase : 400000000
platform : Xilinx Virtex440
model : testing
Memory : 256 MB
Thank
for your support one more.
I will get the Xilinx kernel and try to build it.
Tai