From OSDev Wiki
Jump to: navigation, search

The UltraSPARC architecture is a 64-bit extension of the SPARC (Scalable Processor Architecture) architecture. The processor is used in many machines made by Sun, and is a RISC processor. It contains a IEEE 1275 compliant PROM (a.k.a ~OpenBoot PROM) (with a FORTH interpreter).

The latest Sun machine running a UltraSPARC processor is the UltraSPARC IV, released in 2004 (UltraSPARC V and VI were canceled earlier this year). A UltraSPARC processor called 'Rock', with multiple cores on one chip, is planned for 2006. The current revision of the SPARC arch is version 9.



All registers are 64 bits. There are any number of registers, from 40 to 520 registers, but only 32 registers are available at one time, due to 'registers windows'. A SPARC processor can have 2 to 32 windows (but 7 is the most common number). At any given time however, only one register window can be in use.

There are 8 temporary registers, labeled L0 to L7 (L = local here), meant for temporary data in a function. There are 8 global registers for global data (G0 to G8). However, the G0 register is special because it is always zero. That means a 'nop' can be performed by setting the g0 register (and this is how it's done as a meta-instruction in many UltraSPARC assemblers).

Boot Sequence

The machine boots into a Open Firmware boot ROM (which can be interactive), and the ROM searches for a valid boot device. If a valid bootsector is found, it loads 512 bytes into the memory location 0x4000 (according to the FreeBSD source code), and passes the Open Firmware function call/base address in the register O4. The bootloader must then access the PROM to find out which drive it was booted from, and load the appropriate sectors into memory. The UltraSPARC Linux loader, SILO, loads the kernel to 0x4000 (after loading a second stage somewhere else).

Printing to the console

Unlike the x86 architecture, you don't write to the screen by poking a word into memory, all input/output requests must go through the PROM, which has a special calling convention.


"This information is great and everything, but it's not easy to get an UltraSPARC!" I hear you say. Well, I've (CloudNine) got a UltraSPARC emulator, called Sparkle, in development, so it will be simple to test out code. I'm also planning to run UltraLinux (basically Linux for UltraSPARC) on it. It makes a change from dealing with i386 day in, day out, let's say :)

See Also

External Links

Personal tools