qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] Booting Lubuntu 16.04 on qemu-system-ppc produces errors


From: Andrew Randrianasulu
Subject: Re: [Qemu-ppc] Booting Lubuntu 16.04 on qemu-system-ppc produces errors
Date: Tue, 9 Jul 2019 14:05:11 +0300
User-agent: KMail/1.9.10

В сообщении от Tuesday 09 July 2019 13:13:05 BALATON Zoltan написал(а):
> Hello,
> 
> On Tue, 9 Jul 2019, Andrew Randrianasulu wrote:
> > First my 32-bit qemu from git build was just segfaulting, then I tried 
> > simpler iso (finnix) and found at least
> > one error while booting to console:
> >
> > ./ppc-softmmu/qemu-system-ppc -M mac99,via=pmu -L ./pc-bios -cdrom 
> > ~/finnix-ppc-110.iso -m 512  -display sdl,gl=on   -d guest_errors,unimp 
> > -boot d
> > invalid/unsupported opcode: 3f - 0e - 1a - 00 (fc200e9c) 204a73f0 1
> 
> finnix-ppc-111.iso boots for me but I get different invalid/unsupported 
> opcode error:
> 
> invalid/unsupported opcode: 1f - 0c - 1a - 00 (7c000e99) 6fe429d0 1
> 
> > Next, I tried similar line  but with G3 processor forced:
> >
> > ./ppc-softmmu/qemu-system-ppc -M mac99,via=pmu -L ../queue-vga/pc-bios 
> > -cdrom /mnt/sdb1/PPC-img/lubuntu-16.04-desktop-powerpc.iso -m 512  -display 
> > sdl,gl=on  -device ati-vga,guest_hwcursor=true  -d guest_errors,unimp -boot 
> > d -cpu G3
> > invalid/unsupported opcode: 04 - 02 - 12 - 00 (10000484) 0fcf10f0 1
> > invalid/unsupported opcode: 04 - 02 - 12 - 00 (10000484) 1ffaf0f0 1
> > invalid/unsupported opcode: 04 - 02 - 12 - 00 (10000484) 204470f0 1
> > invalid/unsupported opcode: 04 - 02 - 12 - 00 (10000484) 0f95e0f0 1
> > invalid/unsupported opcode: 04 - 02 - 12 - 00 (10000484) 0f95e0f0 1
> 
> There's no need to force G3, seems to work the same with the default G4 

Unfortunately, it crashes otherwise for me : / (on 32-bit qemu). It even crash 
if I add only ES1370 device, and not ati-vga:

 gdb ./ppc-softmmu/qemu-system-ppc
GNU gdb (GDB) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-slackware-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./ppc-softmmu/qemu-system-ppc...done.
warning: File "/dev/shm/qemu/.gdbinit" auto-loading has been declined by your 
`auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
        add-auto-load-safe-path /dev/shm/qemu/.gdbinit
line to your configuration file "/home/guest/.gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
line to your configuration file "/home/guest/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
        info "(gdb)Auto-loading safe path"
(gdb) run qemu-system-ppc -M mac99,via=pmu -L ../queue-vga/pc-bios -cdrom 
/mnt/sdb1/PPC-img/lubuntu-16.04-desktop-powerpc.iso -m 512  -display sdl,gl=on 
-vga std -d guest_errors,unimp -boot d -cpu G4 -g 1024x768x24 -device ES1370
Starting program: /dev/shm/qemu/ppc-softmmu/qemu-system-ppc qemu-system-ppc -M 
mac99,via=pmu -L ../queue-vga/pc-bios -cdrom 
/mnt/sdb1/PPC-img/lubuntu-16.04-desktop-powerpc.iso -m 512  -display sdl,gl=on 
-vga std -d guest_errors,unimp -boot d -cpu G4 -g 1024x768x24 -device ES1370
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0xf560cb40 (LWP 19193)]
qemu-system-ppc: qemu-system-ppc: Could not open 'qemu-system-ppc': No such 
file or directory
[Thread 0xf560cb40 (LWP 19193) exited]
[Inferior 1 (process 19189) exited with code 01]
(gdb) run  -M mac99,via=pmu -L ../queue-vga/pc-bios -cdrom 
/mnt/sdb1/PPC-img/lubuntu-16.04-desktop-powerpc.iso -m 512  -display sdl,gl=on 
-vga std -d guest_errors,unimp -boot d -cpu G4 -g 1024x768x24 -device ES1370
Starting program: /dev/shm/qemu/ppc-softmmu/qemu-system-ppc -M mac99,via=pmu -L 
../queue-vga/pc-bios -cdrom /mnt/sdb1/PPC-img/lubuntu-16.04-desktop-powerpc.iso 
-m 512  -display sdl,gl=on -vga std -d guest_errors,unimp -boot d -cpu G4 -g 
1024x768x24 -device ES1370
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0xf560cb40 (LWP 19200)]
[New Thread 0xf4c1ab40 (LWP 19201)]
[New Thread 0xec1b7b40 (LWP 19202)]
[New Thread 0xc5962b40 (LWP 19204)]
[Thread 0xf4c1ab40 (LWP 19201) exited]
[New Thread 0xf4c1ab40 (LWP 19219)]

Thread 4 "qemu-system-ppc" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xec1b7b40 (LWP 19202)]
0xf290e844 in code_gen_buffer ()
(gdb) bt full
#0  0xffffffff in code_gen_buffer ()
#1  0x567054ee in cpu_exec (itb=<optimized out>, cpu=<optimized out>) at 
/dev/shm/qemu/accel/tcg/cpu-exec.c:173
        env = <optimized out>
        ret = <optimized out>
        last_tb = <optimized out>
        tb_exit = <optimized out>
        tb_ptr = 0xf290e6c0 <code_gen_buffer+106383006> "‹]ш…Ы\017ЊБ\020"
        ret = 0
        insns_left = <optimized out>
        cflags = <optimized out>
        tb = 0x5720ee58
        last_tb = <optimized out>
        tb_exit = <optimized out>
        cc = <optimized out>
        __func__ = "cpu_exec"
        ret = <optimized out>
        sc = <optimized out>
#2  0x567054ee in cpu_exec (tb_exit=<synthetic pointer>, last_tb=<synthetic 
pointer>, tb=<optimized out>, cpu=<optimized out>) at 
/dev/shm/qemu/accel/tcg/cpu-exec.c:621
        ret = 0
        insns_left = <optimized out>
        cflags = <optimized out>
        tb = 0x5720ee58
        last_tb = <optimized out>
        tb_exit = <optimized out>
        cc = <optimized out>
        __func__ = "cpu_exec"
        ret = <optimized out>
        sc = <optimized out>
#3  0x567054ee in cpu_exec (cpu=0x573ba818) at 
/dev/shm/qemu/accel/tcg/cpu-exec.c:732
        cflags = <optimized out>
        tb = 0x5720ee58
        last_tb = <optimized out>
        tb_exit = <optimized out>
        cc = <optimized out>
        __func__ = "cpu_exec"
        ret = <optimized out>
        sc = <optimized out>
#4  0x566c481e in tcg_cpu_exec (cpu=0x573ba818) at /dev/shm/qemu/cpus.c:1435
        ret = <optimized out>
#5  0x566c6bad in qemu_tcg_rr_cpu_thread_fn (arg=0x573ba818) at 
/dev/shm/qemu/cpus.c:1537
        r = <optimized out>
        cpu = 0x573ba818
        __PRETTY_FUNCTION__ = "qemu_tcg_rr_cpu_thread_fn"
#6  0x56b3d830 in qemu_thread_start (args=0x573df5f0) at 
util/qemu-thread-posix.c:502
        __cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf = {1461775960, 
1463678448, 1461775960, -333745816, -362479778, -1154185173}, __mask_was_saved 
= 0}}, __pad = {0xec1b70d0, 0x0, 0x0, 0x0}}
        __cancel_routine = 0x56b3d890 <qemu_thread_atexit_notify>
        __not_first_call = <optimized out>
        qemu_thread_args = 0x573df5f0
        start_routine = 0x566c6770 <qemu_tcg_rr_cpu_thread_fn>
        arg = 0x573ba818
        r = <optimized out>
#7  0xffffffff in start_thread () at /lib/libpthread.so.0
#8  0xffffffff in clone () at /lib/libc.so.6

I can't see any boot messages because after leaving OpenFirmware console (with 
normal colors) 
 screen remain black until X finally starts.....

My host cpu is:

LANG=C lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
Address sizes:       48 bits physical, 48 bits virtual
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  2
Core(s) per socket:  2
Socket(s):           1
Vendor ID:           AuthenticAMD
CPU family:          21
Model:               2
Model name:          AMD FX(tm)-4300 Quad-Core Processor
Stepping:            0
CPU MHz:             1781.391
CPU max MHz:         3800.0000
CPU min MHz:         1400.0000
BogoMIPS:            7600.09
Virtualization:      AMD-V
L1d cache:           16K
L1i cache:           64K
L2 cache:            2048K
L3 cache:            4096K
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb 
rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf 
pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c 
lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch 
osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core 
perfctr_nb cpb hw_pstate ssbd vmmcall bmi1 arat npt lbrv svm_lock nrip_save 
tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold

----------
but  qemu for now in 32-bit mode (I'll try 64-bit chroot soon)

> and boots for me (albeit very slowly and sometimes complaining about 
> some missed irq) again giving error about same opcode as above:
> 
> invalid/unsupported opcode: 1f - 0c - 1a - 00 (7c000e99) 0fcf1110 1
> invalid/unsupported opcode: 1f - 0c - 1a - 00 (7c000e99) 20590110 1
> invalid/unsupported opcode: 1f - 0c - 1a - 00 (7c000e99) 20272110 1
> invalid/unsupported opcode: 1f - 0c - 1a - 00 (7c000e99) 0f95e110 1
> invalid/unsupported opcode: 1f - 0c - 1a - 00 (7c000e99) 0f95e110 1
> 
> I'm not sure what this is supposed to be, I could not identify what 
> instruction this could be and why it's considered invalid. (Or if it's 
> really invalid why does it appear in guest code.) But regardless seems to 
> boot so maybe this is something the guest code has to be compatible with 
> more processors and these are handled by guest.
> 
> > this booted up to (corrupted colors, but this was using fbdev X driver) 
> > LXde desktop.
> 
> The corrupted colors are because some mismatch with frame buffer 
> endianness. This iso uses 15 bpp mode. Reverting commit a38127414 
> (ati-vga: Fix frame buffer endianness for big endian target) fixes this 
> but that breaks MorphOS Rage128 driver so one of these is probably wrong 
> (and Linux, or OpenBIOS if it uses open firmware console is more likely to 
> be wrong here). 

Colors are fine with -vga std, but probably just any other card on different 
endiannes host/gues combination will give some fanky color
I  booted same Lubuntu and swicthed it via xorg.conf to 24 bpp - transparancy 
(?) becomes intensive blue and offset all other colors..
Note, if you want to have r128 driver in LiveCD you better to update it (sudo 
apt update), and then choose r128-hwe 
(it will require new xorg-core, so make sure toadd input-evdev, because 
removing old xserver will remove drivers too).

Unfortunately, none of tested 8, 16, 24 bpp X variations (with r128 driver and 
UseFBDev option, and acceleration ON) 
resulted in image on screen. X and some fxce programs started up (via startx), 
but screen was black, not even cursor was  visible :/

> Or maybe they access the frame buffer differently as the  
> card has support for big-endian aperture which may not be emulated 
> correctly yet. I think this should be checked on a real PowerMac3,1 to see 
> which of these isos actually work on real hardware to make sure we're 
> testing with correct guest code.

Unfortunately, I have no real ppc machine :/

But thanks anyway, and sorry for bringing up so many bugs at once. 
I think crash on my end a bit more serious, because it happens with just 
qemu-system-ppc + G4 + non-default pci device, it seems...

> 
> Regards,
> BALATON Zoltan
> 





reply via email to

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