Martin Bochnig
2006-Oct-05 12:31 UTC
[qemu-discuss] Suggested stubs for coming a bit closer to functional native sparcv9 HOST support:
Hi, <<qemu-0.8.2-solaris20060930__v9_stubs.gdiff>> ## only a messy personal testing-snapshot FYI, with no compatibility or clarity in mind ## a gdiff -Nurb against 20060930''s http://www.opensolaris.org/os/project/qemu/downloads/qemu-0.8.2-solaris.tar.gz Current Status: ============ This is still the very best I can get on an OpenSolaris sparc64 host when cd''ing to linux-test (from http://www.qemu.com/linux-test-0.5.1.tar.gz) and running # /tmp/Q_E_M_U/sparcv9_testing/qemu-0.8.2-solaris__v9_stubs/i386-softmmu/qemu -nographic -hda linux.img -kernel bzImage-2.4.21 -append "console=ttyS0 root=/dev/hda sb=0x220,5,1,5 ide2=noprobe ide3=noprobe ide4=noprobe ide5=noprobe" -d all : # uname -a SunOS mb1x-ws1 5.11 snv_41 sun4u sparc SUNW,Sun-Fire-280R # isainfo -k sparcv9 # ls -al /tmp/qemu.log -rw-r--r-- 1 root root 2022 Oct 5 13:03 /tmp/qemu.log # cat /tmp/qemu.log EAX=00000000 EBX=00000000 ECX=00000000 EDX=00000600 ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000 EIP=0000fff0 EFL=00000002 [-------] CPL=0 II=0 A20=1 HLT=0 ES =0000 00000000 0000ffff 00000000 CS =f000 ffff0000 0000ffff 00000000 SS =0000 00000000 0000ffff 00000000 DS =0000 00000000 0000ffff 00000000 FS =0000 00000000 0000ffff 00000000 GS =0000 00000000 0000ffff 00000000 LDT=0000 00000000 0000ffff 00008000 TR =0000 00000000 0000ffff 00008000 GDT= 00000000 0000ffff IDT= 00000000 0000ffff CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000 CCS=00000000 CCD=00000000 CCO=EFLAGS ---------------- IN: 0xfffffff0: ljmp $0xf000,$0xe05b OP: 0x0000: movl_T0_im 0xf000 0x0001: movl_T1_imu 0xe05b 0x0002: movl_seg_T0_vm 0x4c 0x0003: movl_T0_T1 0x0004: jmp_T0 0x0005: movl_T0_0 0x0006: exit_tb 0x0007: end AFTER FLAGS OPT: 0x0000: movl_T0_im 0xf000 0x0001: movl_T1_imu 0xe05b 0x0002: movl_seg_T0_vm 0x4c 0x0003: movl_T0_T1 0x0004: jmp_T0 0x0005: movl_T0_0 0x0006: exit_tb 0x0007: end OUT: [size=124] 0x101242060: sethi %hi(0), %o5 0x101242064: or %o5, 1, %o5 ! 0x1 0x101242068: unknown 0x10124206c: sethi %hi(0x11f9400), %o4 0x101242070: add %o5, %o4, %o5 0x101242074: mov %o5, %o5 0x101242078: mov %o5, %g4 0x10124207c: sethi %hi(0), %o5 0x101242080: or %o5, 1, %o5 ! 0x1 0x101242084: unknown 0x101242088: sethi %hi(0x11f9400), %o4 0x10124208c: add %o5, %o4, %o5 0x101242090: or %o5, 0x5b, %o5 0x101242094: mov %o5, %g5 0x101242098: sethi %hi(0xfc00), %o5 0x10124209c: or %o5, 0x3ff, %o5 ! 0xffff 0x1012420a0: and %g4, %o5, %o3 0x1012420a4: sethi %hi(0), %o5 0x1012420a8: or %o5, 1, %o5 ! 0x1 0x1012420ac: unknown 0x1012420b0: sethi %hi(0x11f9400), %o4 0x1012420b4: add %o5, %o4, %o5 0x1012420b8: or %o5, 0x4c, %o5 0x1012420bc: add %g3, %o5, %o5 0x1012420c0: st %o3, [ %o5 ] 0x1012420c4: sll %o3, 4, %o3 0x1012420c8: st %o3, [ %o5 + 4 ] 0x1012420cc: mov %g5, %g4 0x1012420d0: st %g4, [ %g3 + 0x20 ] 0x1012420d4: clr %g4 0x1012420d8: jmp %i0 + 8 # file /tmp/Q_E_M_U/sparcv9_testing/qemu-0.8.2-solaris__v9_stubs/i386-softmmu/qemu i386-softmmu/qemu: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped # Summary ======== I know, being able to natively build for sparcv9 is not "required" by any means (because ultrasparc asm [i.e. ticks] _can_ already be used via sparcv8plus [which is basically 32bit with UltraSPARC extensions / no v8plus cpu ever existed], no sparc-X-sparc kqemu LKM driver exists as of now that would make building for sparcv9 a requirement, and of course can qemu be built now for v8plus, v8 or v7 [special thanks again to Juergen Keil and Johannes Schindelin] and then be run under a booted sparcv9 host kernel), but it would be interesting to see, how one would get it working / what is still missing. References: http://www.cs.utexas.edu/users/novak/sparcv9.pdf http://libvncserver.sourceforge.net/qemu/qemu-porting.html http://www.qemu.com/qemu-tech.html p.s. I finally return to the rather trivial task of bringing the promised SUNWqemu and CSWqemu packages out, plus a patch against http://www.qemu.com/qemu-0.8.2.tar.gz Globally switching to current CVS afterwards (already tested it on sparc32). I apologize for the delay. Regards, Maddin http://www.martux.org -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: qemu-0.8.2-solaris20060930__v9_stubs.gdiff URL: <http://mail.opensolaris.org/pipermail/qemu-discuss/attachments/20061005/10cb6d39/attachment.ksh>