qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* qemu-system-sparc64 instruction set architecture compatibility (sparc v8+ vs sparc v9)
@ 2021-04-04 12:07 CKIM
  2021-04-05 11:16 ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: CKIM @ 2021-04-04 12:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: cheolyon38

Hello,

I'm not sure if this is right mailing list for this question but I 
really appreciate if someone can answer to my question.

I have very old binary (testgen) which was built from old sparc station. 
(no source code)

If I run "file testgen", I get the following.
ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, 
UltraSPARC1 Extensions Required, statically linked, not stripped

I want to run this binary from qemu as the sparc station (sun4u sparc 
SUNW,Sun-Fire-V440) is very unstable.


Can QEMU (qemu-system-sparc64) support sparc32 application with v8+ ?


I tried to install a few packages listed at 
https://wiki.qemu.org/Documentation/Platforms/SPARC

I was able to install most of sun4m / sun4u guests listed in the wiki 
and network setup was also ok but none of them could run the "testgen" 
binary.

I always get "Cannot execute ELF binary" error message.

example with QEMU 5.2.0 version:
qemu-system-sparc64 -m 512 -drive 
file=disk_image_netbsd64.raw,format=raw,index=0, \
-net nic,macaddr=52:54:00:fa:ce:10,model=e1000 \
-net tap -nographic \
-cdrom NetBSD-9.1-sparc64.iso \
-boot d

I found the cpu type is set "TI-UltraSparc-IIi" as default.

I couldn't find any option related to the instruction set architecture. 
(qemu-system-sparc64 --help)

If I try the "niagara" machine example (OpenSPARCT1_Arch.1.5.tar.bz2), I 
get:

# isainfo -v
64-bit sparcv9 applications
         asi_blk_init
32-bit sparc applications
         asi_blk_init v8plus div32 mul32

It shows v8plus explicitly so I guess the niagara guest should be able 
to run my "testgen" binary but I couldn't find any information about the 
network setup for the OpenSPARCT1_Arch.1.5.tar.bz2. So I can't copy my 
project files onto the guest machine.

My Sun physical server shows:
uname -a
SunOS sinuc035 5.8 Generic_117350-62 sun4u sparc SUNW,Sun-Fire-V440

I understand the sparc v7, v8, v8+, v9 are not chip architectures but 
they are Instruction Set Architectures so I think the binary could run 
on sun4u or sun4v, niagara ...

Can anyone know how to run the sparc32 v8+ binary from QEMU ?
Is it something the iso file need to be changed or qemu issue?

I appreciate if any useful info or hint. Thanks!


Best Regards,
CKIM


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: qemu-system-sparc64 instruction set architecture compatibility (sparc v8+ vs sparc v9)
  2021-04-04 12:07 qemu-system-sparc64 instruction set architecture compatibility (sparc v8+ vs sparc v9) CKIM
@ 2021-04-05 11:16 ` Peter Maydell
  2021-04-05 14:00   ` CKIM
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2021-04-05 11:16 UTC (permalink / raw)
  To: CKIM; +Cc: cheolyon38, QEMU Developers

On Sun, 4 Apr 2021 at 23:26, CKIM <sgplap30@gmail.com> wrote:
> I have very old binary (testgen) which was built from old sparc station.
> (no source code)
>
> If I run "file testgen", I get the following.
> ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required,
> UltraSPARC1 Extensions Required, statically linked, not stripped

You don't say what OS this binary is intended to run on.

> I was able to install most of sun4m / sun4u guests listed in the wiki
> and network setup was also ok but none of them could run the "testgen"
> binary.
>
> I always get "Cannot execute ELF binary" error message.

Are any of them the OS that the binary requires? You should
start by using the right OS, not by trying to test all of them.

thanks
-- PMM


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: qemu-system-sparc64 instruction set architecture compatibility (sparc v8+ vs sparc v9)
  2021-04-05 11:16 ` Peter Maydell
@ 2021-04-05 14:00   ` CKIM
  0 siblings, 0 replies; 3+ messages in thread
From: CKIM @ 2021-04-05 14:00 UTC (permalink / raw)
  To: Peter Maydell; +Cc: cheolyon38, QEMU Developers



On 4/5/2021 7:16 PM, Peter Maydell wrote:
> On Sun, 4 Apr 2021 at 23:26, CKIM <sgplap30@gmail.com> wrote:
>> I have very old binary (testgen) which was built from old sparc station.
>> (no source code)
>>
>> If I run "file testgen", I get the following.
>> ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required,
>> UltraSPARC1 Extensions Required, statically linked, not stripped
> 
> You don't say what OS this binary is intended to run on.

The binary is running on Sun Solaris 5.8.
SunOS sinuc035 5.8 Generic_117350-62 sun4u sparc SUNW,Sun-Fire-V440

> 
>> I was able to install most of sun4m / sun4u guests listed in the wiki
>> and network setup was also ok but none of them could run the "testgen"
>> binary.
>>
>> I always get "Cannot execute ELF binary" error message.
> 
> Are any of them the OS that the binary requires? You should
> start by using the right OS, not by trying to test all of them.

Yeah.. I started the Solaris first. Solaris 2.6, 7, 8, 9 all sun4m. None 
of them worked.

The solaris10 (OpenSPARCT1_Arch.1.5.tar.bz2) doesn't have info how to 
setup network...

Do you mean the binary from SunOS won't work on other OS like NetBSD ?
I thought NetBSD/sparc64 can run solaris binaries.

> 
> thanks
> -- PMM
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-05 14:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-04 12:07 qemu-system-sparc64 instruction set architecture compatibility (sparc v8+ vs sparc v9) CKIM
2021-04-05 11:16 ` Peter Maydell
2021-04-05 14:00   ` CKIM

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).