Description of problem: I am trying to boot a PPC Fedora image. This version worked: 2:qemu-system-ppc-0.10-0.12.kvm20090323git.fc11.x86_64, but now it fails with: invalid/unsupported opcode: 00 - 18 - 01 (00004070) 00000004 1 invalid/unsupported opcode: 00 - 04 - 17 (000095c8) 000095ec 0 Version-Release number of selected component (if applicable): qemu-system-ppc-0.10-4.fc11.x86_64 How reproducible: Always. Steps to Reproduce: $ qemu-system-ppc -cdrom Fedora-10-ppc-netinst.iso
Also with this release, qemu-system-arm stopped working: $ qemu-system-arm -M versatilepb rootfs-f10-dev -kernel zImage-versatile-2.6.24-rc7.armv5tel #0 0x0000003ad6a17f07 in SDL_memcpySSE (to=<value optimized out>, from=<value optimized out>, len=<value optimized out>) at src/video/SDL_blit.c:141 #1 SDL_BlitCopy (to=<value optimized out>, from=<value optimized out>, len=<value optimized out>) at src/video/SDL_blit.c:172 #2 0x0000003ad6a17d4a in SDL_SoftBlit (src=0x2dd8f60, srcrect=<value optimized out>, dst=0x2dc4010, dstrect=0x7fff18391dc0) at src/video/SDL_blit.c:97 #3 0x0000003ad6a2e0ec in SDL_LowerBlit (src=0x2dd8f60, srcrect=0x7fff18391d70, dst=0xa00, dstrect=0xa00) at src/video/SDL_surface.c:440 #4 0x0000003ad6a2e2c7 in SDL_UpperBlit (src=0x7f9d013ea000, srcrect=<value optimized out>, dst=0xa00, dstrect=0xa00) at src/video/SDL_surface.c:530 #5 0x00000000004c4cdf in sdl_update (ds=<value optimized out>, x=0, y=0, w=640, h=<value optimized out>) at sdl.c:66 #6 0x000000000043c650 in dpy_update (h=<value optimized out>, w=<value optimized out>, y=<value optimized out>, x=<value optimized out>, s=<value optimized out>) at ../console.h:156 #7 pl110_update_display (h=<value optimized out>, w=<value optimized out>, y=<value optimized out>, x=<value optimized out>, s=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/hw/pl110.c:225 #8 0x00000000004c4d4a in sdl_refresh (ds=0x2d24f80) at sdl.c:417 #9 0x00000000004087ce in dpy_refresh (s=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/console.h:183 #10 gui_update (s=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:3499 #11 0x000000000040908a in qemu_run_timers (current_time=<value optimized out>, ptimer_head=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:1240 #12 main_loop_wait (current_time=<value optimized out>, ptimer_head=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:3812 #13 0x000000000040cbaa in main_loop () at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:3972 #14 main () at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:6126
Thanks, it looks like a known bug in libSDL *** This bug has been marked as a duplicate of bug 487720 ***
Adam, Can you include a trace of the ppc crash, for us to be sure about the problem?
ppc doesn't crash, it just produces this message and hangs: invalid/unsupported opcode: 00 - 18 - 01 (00004070) 00000004 1 invalid/unsupported opcode: 00 - 04 - 17 (000095c8) 000095ec 0 I will test tonight with new SDL.
Oops, this has nothing to do with the SDL crash. I am not sure how to proceed in debugging this problem.
Thanks Adam. Could you confirm that it boots with -nographic? If so, then from what I can make out from qemu-devel discussion: http://www.archivum.info/qemu-devel@nongnu.org/2009-03/msg01087.html the bug is in openbios and this should be the fix: http://tracker.coreboot.org/trac/openbios/changeset/481
No luck: $ qemu-system-ppc -nographic Fedora-10-ppc-DVD.iso invalid/unsupported opcode: 00 - 18 - 01 (00004070) 00000004 1 invalid/unsupported opcode: 00 - 04 - 17 (000095c8) 000095ec 0
I'm running openbios-ppc-1.0-0.5.svn463.fc11.noarch, according to the message, the fix is in r481?
(In reply to comment #8) > I'm running openbios-ppc-1.0-0.5.svn463.fc11.noarch, according to the message, > the fix is in r481? Well, according to the message, if it was the same problem it should go away when you use -nographic. Sounds like we're on an arbitrary svn snapshot, though. Glauber, do you think it would be worthwhile updating to latest svn? Do you know if they have any plans to do a release?
Can you do a scratch build of the latest openbios? Happy to test it.
I've rebuild openbios from the source RPM on a PowerPC system (Fedora 10 PPC, G3 Blue & White) and it's working for me. The binary from Rawhide is failing in exactly the same way as for the reported. The binary must be miscompiled.
Created attachment 339211 [details] openbios-ppc, r482, working
r463 is not arbitrary. It _is_ the release (as odly as it seems). If you go to openbios website, and try to get the "1.0" release, you'll get to this link: http://tracker.coreboot.org/trac/openbios/changeset/463/openbios-devel?old_path=%2F&old=463&format=zip Note the /changeset/463 There are no tarballs. I can update the revision, But I'd prefer to leave it this way, and apply this patch.
Not working for me: $ rpm -q openbios-ppc openbios-ppc-1.0-0.6.svn463.fc11.noarch $ qemu-system-ppc Fedora-10-ppc-DVD.iso invalid/unsupported opcode: 00 - 18 - 01 (00004070) 00000004 1 invalid/unsupported opcode: 00 - 04 - 17 (000095c8) 000095ec 0
(In reply to comment #13) > There are no tarballs. I can update the revision, But I'd prefer to leave it > this way That's fine, thanks, I just didn't realize (In reply to comment #14) > Not working for me: > > $ rpm -q openbios-ppc > openbios-ppc-1.0-0.6.svn463.fc11.noarch > > $ qemu-system-ppc Fedora-10-ppc-DVD.iso > invalid/unsupported opcode: 00 - 18 - 01 (00004070) 00000004 1 > invalid/unsupported opcode: 00 - 04 - 17 (000095c8) 000095ec 0 Adam - could you report this to the upstream mailing list?
> (In reply to comment #14) > > Not working for me: > > > > $ rpm -q openbios-ppc > > openbios-ppc-1.0-0.6.svn463.fc11.noarch > > > > $ qemu-system-ppc Fedora-10-ppc-DVD.iso > > invalid/unsupported opcode: 00 - 18 - 01 (00004070) 00000004 1 > > invalid/unsupported opcode: 00 - 04 - 17 (000095c8) 000095ec 0 > > Adam - could you report this to the upstream mailing list? Sorry, I misread - could you confirm that Pavel's build in comment #12 works for you?
Sorry! Yes, Pavel's build works.
That build works, however contains a new bug. Using that openbios version, my kernel doesn't boot at all. It will boot from CD-rom, but not with a -kernel option. I was using: qemu-system-ppc -hda hd.img -cdrom cd.iso -kernel vmlinux -initrd initrd.img -append "root=/dev/hdc3" I want to use -nographic but versions < 482 give the mentioned error. This version does not give an error, but does not boot either. Versions < 482 do boot with the above commandline.
Henri, Adam, Pavel - the best way to get this resolved is to work with upstream to find a fix
I'm afraid we have drifted from the original problem. The problem with reading iso images is present upstream. I believe it has never worked, so it's not a "new bug". But the problem with invalid opcode is not present upstream, not even in the release 1.0. It must be caused by the Fedora build system and it's still not fixed. The current version 0:1.0-0.6.svn463.fc11 is still broken.
(In reply to comment #20) > But the problem with invalid opcode is not present upstream, not even in the > release 1.0. It must be caused by the Fedora build system and it's still not > fixed. Agreed; I posted this request for help upstream a while back: http://lists.gnu.org/archive/html/qemu-devel/2009-04/msg01227.html Just a suggestion to you guys to follow up with upstream and see if the problem can be narrowed down enough to confirm that it's a compiler issue
To clarify: I don't get the opcode bug with the r482 build. I'm getting the qemu prompt, instead of linux booting. This boots from the CD-rom without errors (v482): qemu-system-ppc -hda hd.img -cdrom cd.iso -kernel vmlinux -initrd initrd.img -append "root=/dev/hdc3" -boot d -nographic This boots without errors (V463): qemu-system-ppc -hda hd.img -cdrom cd.iso -kernel vmlinux -initrd initrd.img -append "root=/dev/hdc3" This doesn't load the kernel, just loads the qemu prompt (v482): qemu-system-ppc -hda hd.img -cdrom cd.iso -kernel vmlinux -initrd initrd.img -append "root=/dev/hdc3" So does this: qemu-system-ppc -hda hd.img -cdrom cd.iso -kernel vmlinux -initrd initrd.img -append "root=/dev/hdc3" -nographic So the opcode bug was fixed, the -nographic option now works, but the fix broke the booting from a kernel. I'll try 'upstream'..
It's not gcc, it's binutils. Upgrading gcc from 4.3.2 to 4.4.0 from rawhide doesn't cause the invalid opcode. However, upgrading binutils from 2.18.50.0.9 to 2.19.51.0.2 does cause it!
Great stuff Pavel, moving to binutils
Hi Guys, Would it be possible for someone to post a copy of the openbios-ppc file that is broken, so that I can compare it to the working r482 version ? One thing that has changed with the 2.19.51.0.2 binutils rpm is the addition of support for version 2.06 of the PowerPC ISA. (This is the binutils-2.19.51.0.2-IBM.patch in the rpm). You might like to try removing this patch from the sources and then rebuilding the binutils. This may allow you to build a working bios image, (and help me isolate where the bug can be found). Cheers Nick
I have tried attachment -> not working I have tried rebuild binutils without binutils-2.19.51.0.2-IBM.patch and then rebuilt openbios -> not working.
Rebuilding binutils without binutils-2.19.51.0.2-IBM.patch doesn't help. Rebuilding binutils without any Fedora patches doesn't help either. I'm still getting "invalid opcode". I've patched r487 to fix a warning in the IDE code (the code was indeed buggy, to put it mildly) and to fix or suppress strict aliasing warnings. Then I compared the "objdump -x" output for the binaries made with the F10 binutils and the F11 binutils. The former has many sections starting with .sbss followed by a number. The later has one .sbss section. Also, the F11 version had an extra segment with vaddr 0x00000000: LOAD off 0x000000b4 vaddr 0x00000000 paddr 0x00000000 align 2**2 filesz 0x00000000 memsz 0x00000044 flags rw- I changed the linker script to consolidate and align the .sbss sections, and it helped! The resulting binary has one .sbss section and no extra segment. The "invalid opcode" error is gone.
Created attachment 344302 [details] Fix for the bug
Created attachment 344303 [details] openbios-ppc, r487, working, compiled by F10 binutils
Created attachment 344304 [details] openbios-ppc, r487, not working, compiled by F11 binutils
Created attachment 344305 [details] openbios-ppc, r487 with the sbss fix, working, compiled by F11 binutils
Created attachment 344309 [details] Simpler fix - just merge .sbss and .sbss.* into .bss
Just a note that I'm seeing failures of libguestfs on ppc and ppc64, apparently because of this. Some sample builds which have failed: http://koji.fedoraproject.org/koji/taskinfo?taskID=1361259 http://koji.fedoraproject.org/koji/taskinfo?taskID=1361261
The bug is fixed upstream in r488. You probably want to pull r489 as well, as it fixes the ATA breakage. Actually, I still cannot get OpenBIOS to read any filesystem in qemu, but your mileage may vary.
I have tried: svn export -r489 svn://openbios.org/openbios/trunk/openbios-devel openbios-devel cd openbios-devel config/scripts/switch-arch ppc make cp obj-ppc/openbios-qemu.elf /usr/share/openbios/openbios-ppc but I still get invalid/unsupported opcode...
I can reproduce your problem, but it's a separate bug. qemu-system-ppc appears to be broken on PowerPC. That's how it fails: # qemu-system-ppc -hda noboot.iso *** WARNING: no opcode defined ! invalid/unsupported opcode: 12 - 1e - 0d (4bf0237d) fffffffc 0 Note that the "WARNING" is absent on x86_64. I believe it means that no opcodes are known to the emulator. The invalid opcode is found at the position 0xfffffffc, which is the start address for PowerPC. It comes from the .romentry section. Disassembling openbios-ppc with objdump gives: fffffffc <.romentry>: fffffffc: 4b f0 23 7d bl 0xfff02378 Thus, 4b f0 23 7d is a valid instruction, but qemu-system-ppc fails to interpret it. This bug is about an error on x86_64. In this case, there is no "WARNING" and the error is: invalid/unsupported opcode: 00 - 18 - 01 (00004070) 00000004 1 I believe it's caused by qemu starting at the position 0 because it finds a segment at that address corresponding to the .sbss section. Grouping .sbss with .bss eliminates that segment.
Thanks Pavel, I'm pushing an update with your fix: * Thu May 21 2009 Mark McLoughlin <markmc> - 1.0-1 - Replace previous attempt to fix bug #494075 with fix from Pavel Roskin - Drop the 0.x.463 numbering; we are using official upstream 1.0 Adam, Henri, Roman - please test out this new version and file new bugs for any issues other than: invalid/unsupported opcode: 00 - 18 - 01 (00004070) 00000004 1 Things just get way to confusing if we mix different issues up in the one bug report
I'm very confused here ... Which bug is qemu-system-ppc running on PPC failing with: invalid/unsupported opcode: 00 - 18 - 01 (00004070) 00000004 1 invalid/unsupported opcode: 00 - 04 - 17 (000095c8) 000095ec 0 Or do we need to open another bug for that?
openbios-1.0-1.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/openbios-1.0-1.fc11
(In reply to comment #38) > I'm very confused here ... Which bug is qemu-system-ppc running > on PPC failing with: > > invalid/unsupported opcode: 00 - 18 - 01 (00004070) 00000004 1 > invalid/unsupported opcode: 00 - 04 - 17 (000095c8) 000095ec 0 > > Or do we need to open another bug for that? This update should fix that issue, just make sure you have openbios-ppc-1.0-1.fc11.noarch installed (The horribly confusing thing is that this is built on ppc using ppc binutils, but it's actually shipped as a noarch package installable on all arches)
openbios-1.0-1.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update openbios'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-5394
openbios-1.0-1.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
Still not working here. [rrakus@localhost ~]$ rpm -q openbios-ppc openbios-ppc-1.0-1.fc11.noarch [rrakus@localhost ~]$ qemu-system-ppc -boot d -m 256 -hda rhel-5 -cdrom RHEL5.3-Server-20090106.0-ppc-DVD.iso -M prep *** WARNING: no opcode defined ! invalid/unsupported opcode: 12 - 02 - 18 (4bfffe05) fffffffc 0 invalid/unsupported opcode: 00 - 00 - 00 (00000000) 00000700 0
Roman: I think you're testing on qemu-system-ppc on a ppc host? This bug is about qemu-system-ppc on an x86_64 host. See what Pavel said above: (In reply to comment #36) > I can reproduce your problem, but it's a separate bug. > > qemu-system-ppc appears to be broken on PowerPC. That's how it fails: > > # qemu-system-ppc -hda noboot.iso > *** WARNING: no opcode defined ! > invalid/unsupported opcode: 12 - 1e - 0d (4bf0237d) fffffffc 0 > > Note that the "WARNING" is absent on x86_64. Please file a new bug for this issue