Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Sparc binaries without Sparc hardware

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.

like image 988
nelsonslament Avatar asked Oct 02 '08 03:10

nelsonslament


4 Answers

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.

like image 112
DGentry Avatar answered Nov 16 '22 04:11

DGentry


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.

like image 32
Alexey Shatygin Avatar answered Nov 16 '22 05:11

Alexey Shatygin


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

like image 35
ConcernedOfTunbridgeWells Avatar answered Nov 16 '22 04:11

ConcernedOfTunbridgeWells


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.

like image 22
cb88 Avatar answered Nov 16 '22 05:11

cb88