Run Sparc binaries without Sparc hardware
Asked Answered
S

10

12

I've been curious in the past few months in trying my hand at doing some assembly for the SPARC processor (either V8 or V9). My question is this, I have no access to a SPARC machine, is there a way I can run SPARC binaries on my x86 machine? I've looked at QEMU but I am not too sure how to set it up.

Spitsbergen answered 2/10, 2008 at 3:38 Comment(0)
E
6

SimICS emulates a Sparc platform. Academic and personal licenses are free.

Edit: I didn't do SimICS justice in my initial response, it is a very useful tool for Sparc-based development. You can instrument, profile, and explore the behavior or code in both user space and kernel space. I first became aware of it about 10 years ago, when it was released by the Swedish Institute of Computer Science (SICS). They later spun it out as a commercial product.

Estoppel answered 2/10, 2008 at 4:7 Comment(2)
Details: The most solid Sparc V9 simulator is Virtutech Simics, at virtutech.com/academic . Free for academic usage, and has a very solid Sparc server model of the US-II and US-III/III+/IV+ generations (as well as a simple Niagara). Runs Solaris 7 to 10, and Linux.Zebu
Appears to have changed hands, the URL is now: windriver.com/products/simics and does not appear to have an academic or other evaluation/download available.Tholos
B
3

Ok, here it is:

  • qemu is emulating user code, not system
  • tkisem is graphically displaying cpu internals
  • Also, there is a thing called "ISEM" (Instructional Sparc Emulator)

Maybe googling will help you with detailed information. My opinion - qemu is good enough for that.

Bobbibobbie answered 2/10, 2008 at 3:51 Comment(1)
qemu is both system and user mode emulatorBeachlamar
R
3

As an aside, you can get older secondhand Sun workstations off Ebay for about 3/4 of buggerall.

Respiratory answered 23/10, 2008 at 21:16 Comment(1)
$400 for a 48 core with 64gb if ram + some disks as of Jan 2106. Will run Solaris 11.Tabernacle
F
3

This emulates a SparcStation 2 (sun4c 32bit SPARCv7) and also an Ultra-1 (sun4u 64bit SPARCv9) from what I understand the fedelity is pretty high as it uses stock dumped roms even from the framebuffer.

http://people.csail.mit.edu/fredette/tme/

As for the difference between v7 v8 and v9 of Sparc v7 and v8 are 32bit v9 is 64bit. Note that QEMU isn't all that faithful of an emulation and it does dynamically recompile so it might be a bit faster (in practice it is pretty slow) but at the price of possibly less compatibility. QEMU for v7-v8 can boot Linux and most BSD's and experimentally Solaris. QEMU for SPARCv9 is experimental.

I have built TME on Linux but it will probably go better if you just install NetBSD and build it on there that way you can use the networking support it has and the older compilers won't complain some much on the code.

I have a somewhat patched version of it here https://github.com/cb88/tme I would appreciate help working on it most of the patches are from NetBSD pkgsrc but I think I cleaned up a few other things.

Forgetful answered 11/2, 2013 at 17:28 Comment(0)
O
2

In addition to complete system emulation, QEMU can also emulate SPARC at the user-space level, so that you can write a program in SPARC assembly and use standard Linux system calls and it will call the standard x86 kernel versions... works pretty well!!

If you aren't sure you want to learn SPARC assembly specifically, you might look into MIPS instead. Most wireless routers are based on MIPS processors and can run Linux. It is similar to SPARC, of a similar vintage, and along with SPARC it's one of the two original RISC architectures... in my opinion MIPS is actually a little bit more of a clean and elegant architecture than SPARC, but they're both great.

Oxytocic answered 2/10, 2008 at 4:35 Comment(1)
Great idea - if one is interested in learning RISCy stuff, they are of very similar vein.Skim
A
1

Looks like QEMU does enough emulation for you to install a SPARC Linux on: http://www.bellard.org/qemu/status.html

In which case, just grab a SPARC distribution (e.g., Debian), and you're all set!

Audiphone answered 2/10, 2008 at 3:43 Comment(0)
E
1

polarhome offers shell access to a Solaris system (which appears to be a Sun Sparc system, not x86). It costs 10 local currency units (dollars, euros, etc) or $2 US, whichever is greater.

Estoppel answered 2/10, 2008 at 4:17 Comment(0)
C
1

Aeroflex Gaisler has comercial simulators for their LEON2, LEON3 and LEON4 processors which are actually SPARC. There is also a limited evaluation version for LEON3.

See http://www.gaisler.com/index.php/downloads/simulators

They provide free GCC cross-compilers for Windows (MinGW) and Linux:

http://www.gaisler.com/index.php/downloads/compilers

Centesimo answered 14/8, 2013 at 8:27 Comment(0)
B
0

Please have a look at http://www.stromasys.com, CHARON-SPK meets your requirements. Also http://www.stromasys.ch/virtualization-solutions/virtual-sparcstation/ could help.

Byelorussian answered 23/8, 2012 at 8:37 Comment(0)
T
0

Just a note that If you're intend to run Solaris later than 2.5.1/5.5 then qemu-sparc won't help you. NetBSD and Linux should run fine though.

This is because qemu-sparc supports only very old SPARC processors. It will either cause the Solaris installer to throw an error when it realizes the architecture is too old, or fault/crash before it gets started if you try to install Solaris 8-11.

Mentioned previously but some cost details: A fully functional 64 core SPARC 2U capable of running Solaris 11 can be acquired from EBay for about $400USD if you want to go that route. A T5220 will do Solaris 11.

I don't have experience with the other emulators mentioned here but have also heard good things about Simics, though it's expensive.

Tabernacle answered 9/4, 2017 at 13:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.