[Top][All Lists]

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

Re: [Qemu-ppc] Problem booting qemu-system-ppc with cpu e500XX and machi

From: Badrinath Sriman
Subject: Re: [Qemu-ppc] Problem booting qemu-system-ppc with cpu e500XX and machine mpc8544ds
Date: Wed, 4 Jul 2012 13:37:08 +0530

Alex & Scott,
Thanks for your continued support on this issue. While trying to boot netbsd on 
e500, from a qemu built from the HEAD, using the command,
                 "qemu-system-ppc -cpu e500v2 -M mpc8544ds -kernel 
~/Downloads/netbsd  -nographic -m 1024",

I get a completely blank output and the process continues to run in the 

Turning on qemu -d exec option, gives the following output:

           "invalid/unsupported opcode: 00 - 00 - 00 (00000000) 00000000 0"

Turning on qemu -in_asm,out_asm options, gives the following output:

IN: e500_cnputc
0x00297620:  lbz     r0,0(r9)
0x00297624:  andi.   r10,r0,32
0x00297628:  beq+    0x297618

invalid/unsupported opcode: 00 - 00 - 00 (00000000) 00000000 0
0x00000000:  .long 0x0

OUT: [size=44]
0x01f18de0:  mov    %ebp,(%esp)
0x01f18de3:  mov    $0x6,%ebx
0x01f18de8:  mov    %ebx,0x4(%esp)
0x01f18dec:  mov    $0x21,%ebx
0x01f18df1:  mov    %ebx,0x8(%esp)
0x01f18df5:  mov    $0x4,%ebx
0x01f18dfa:  mov    %ebx,0x25c(%ebp)
0x01f18e00:  call   0xbe95c0
0x01f18e05:  xor    %eax,%eax
0x01f18e07:  jmp    0x13d63b4

I searched for the invalid/unsupported opcode known issues and then tried by 
patching in the patch given in:

I also made sure that the qemu has the patch 
http://lists.gnu.org/archive/html/qemu-ppc/2012-06/msg00266.html (require 

I also tried using the latest openbios-ppc version by using the -bios option, 
but the problem remains the same. It is trying to access memory location 

Unfortunately, I do not have a ppc machine to run ppc-gdb. Hence, my i386 gdb 
is not helping  much.

Actually, I think I dont even need a -M mpc8544ds option. Just emulating the 
e500v2 instruction set with the -cpu e500v2 is enough I guess. I found some 
recent qemu commits separating dependency of e500 from mpc8544xx, but looks 
like they are not yet available from the HEAD. Hence couldnt try that.

Can you please let me know whether I am missing some known issue in bios? If 
not, advise on how to debug further.


From: Alexander Graf address@hidden
Sent: Tuesday, July 03, 2012 12:29 PM
To: Scott Wood
Cc: Badrinath Sriman; address@hidden
Subject: Re: [Qemu-ppc] Problem booting qemu-system-ppc with cpu e500XX and 
machine mpc8544ds

On 03.07.2012, at 20:49, Scott Wood wrote:

> On 07/03/2012 12:22 AM, Badrinath Sriman wrote:
>> I am using the bootable CDROM option only because qemu requires the
>> CDROM/hard disk images to be bootable. On real hardware, we use the
>> bootm option of U-boot. Using qemu, I was not able to find helpful
>> instructions to boot netbsd/ppc via. uboot (as bootloader).
> U-Boot doesn't run in QEMU -- it would require a lot more hardware to be
> emulated and/or changes to U-Boot.
>> The
>> nearest that I could come to booting netbsd/ppc combination was
>> through ofwboot as the bootloader.
> That's not going to work without an Open Firmware implementation, which
> we don't have on e500 either in QEMU or on real hardware. :-)
>> I am now trying to use the -kernel
>> option to boot the netbsd kernel. Looks like the -M mpc8544ds option
>> mandatorily requires a FDT. The netbsd that we are using does not
>> have the FDT option when it is compiled. So trying to understand more
>> about FDT and the qemu implementation of FDT, to debug the booting
>> issue.
> QEMU will pass an FDT to the target, but the target doesn't need to use
> it.  The FDT comes from QEMU -- it used to be in pc-bios/, but on

Yes. You do need libfdt however installed on the host, because we will pass an 
fdt into the guest regardless.

> top-of-tree it is now generated internally to QEMU and doesn't need to
> be passed in on the command line anymore.
> However, a problem with the target OS not being device tree driven is
> that QEMU doesn't emulate all the hardware on a real mpc8544ds.  It
> emulates a small subset, and the device tree is how this subset is
> communicated.  So you'll have to somehow make sure that NetBSD is not
> trying to access any devices other than the one serial port, the one PCI
> bus, and the reset register in the global utilities block.

Or you implement all the hardware a real mpc8544ds would have in QEMU and send 
patches :). I'd love to see NetBSD work properly on that target.


reply via email to

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