Missing op on SPARC
Hi, all
I have a Linux/SPARC machine and want to run QEMU on it.
Here is the system information.
----------------------------------------------------------
$ uname -a Linux sparc 2.6.37-rc5-git #1 SMP Tue Dec 21 17:03:53 CST 2010 sparc64 sun4v UltraSparc T2 (Niagara2) GNU/Linux $ gcc --version gcc (Gentoo 4.3.4 p1.0, pie-10.1.5) 4.3.4 ----------------------------------------------------------
QEMU is configured with "--sparc_cpu=v8plus". QEMU report
there are some missing op definitions. See below,
----------------------------------------------------------
$ qemu-sparc hello Missing op definition for qemu_ld64 Missing op definition for qemu_st64 /tmp/chenwj/qemu-0.14.0/tcg/tcg.c:1116: tcg fatal error Aborted ----------------------------------------------------------
Is it possible to fix it? If so, how?
Any sugguestions appreciated.
Regards,
chenwj
Signature · 4 lines
Wei-Ren Chen (陳韋任) Parallel Processing Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667
Quoted 16 lines · 陳韋任
Hi, all
I have a Linux/SPARC machine and want to run QEMU on it. Here is the system information.
----------------------------------------------------------
$ uname -a Linux sparc 2.6.37-rc5-git #1 SMP Tue Dec 21 17:03:53 CST 2010 sparc64 sun4v UltraSparc T2 (Niagara2) GNU/Linux $ gcc --version gcc (Gentoo 4.3.4 p1.0, pie-10.1.5) 4.3.4 ----------------------------------------------------------QEMU is configured with "--sparc_cpu=v8plus". QEMU report there are some missing op definitions. See below,
----------------------------------------------------------
Quoted 8 lines
$ qemu-sparc hello Missing op definition for qemu_ld64 Missing op definition for qemu_st64 /tmp/chenwj/qemu-0.14.0/tcg/tcg.c:1116: tcg fatal error Aborted ----------------------------------------------------------Is it possible to fix it? If so, how?
Yes, the place is in tcg/sparc/tcg-target.[ch]. Sparc generator for TCG only implements the functions qemu_ld64/st64 on V9 (full 64 bit). These should be implemented also for v8plus.
This can be implemented by adding a helper function to call the V9 versions of tcg_out_qemu_ld/st. One problem is that v8plus gives few 64 bit registers, %g1 to %g7, so addr_reg should probably be set up to %g1 and data_reg to %g2 in the v8plus helper. Data and address must be moved to/from these registers from/to 32 bit registers allocated by TCG.
Hi, Blue
Since my machine is UltraSparc T2, I should configure QEMU with
"--sparc_cpu=v9", right? But it gave me the error below,
ERROR: "gcc" either does not exist or does not work
Maybe I should pass some flag to QEMU or update my gcc?
Regards,
chenwj
Signature · 4 lines
Wei-Ren Chen (陳韋任) Parallel Processing Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667
Quoted 8 lines · 陳韋任
Hi, Blue
Since my machine is UltraSparc T2, I should configure QEMU with "--sparc_cpu=v9", right? But it gave me the error below,
ERROR: "gcc" either does not exist or does not work
Maybe I should pass some flag to QEMU or update my gcc?
The logs probably tell the reason, but in general for V9 you'd need fully 64 bit system libraries, at least for those that QEMU needs. For example, Debian uses 32 bit userland (V8, maybe also v8plus), but OpenBSD is fully 64 bit on Sparc64 (gcc can't even produce 32 bit executables).
Configuring for v8 should work, since V9 CPUs can also run V8 software.