SPARC-HOWTO.

The SPARC family of microprocessors is a very good implementation of the RISC design,
SPARC based workstations are usually very well engineered products,
thus Linux on SPARC is a winning combination both in performance and ease of use. Actually this combination is not as widspread as the Linux/x86; this HOWTO
should help you step by step to make an informed decision: try it you will not
regret it.

This document is a step by step guide meant to
provide information in order
to help you running Linux on SPARC based workstations,
As these computers are quite different from PCs there is
an hardware section, this should help you on understanding, how they
work, what to expect from the various CPUs and models.

I am not a SPARC specialist, nor a Solaris or Linux guru, I am just
someone who is realy found of well engineered product, and I wish to
help you in choosing your hardware and finding information. Thus I
have tried to write down this document in order to ease your path.

I hope this document will help you and you will have a lot of fun
with your SPARC Workstation.

We are only dealing with, SPARC based
workstations, in order to check, just
type uname -m command and you should read
something like sparc4x where x is blank,c,d,m,u
if the system runs Solaris, or sparc for 32 bits SPARC architectures
and sparc64 for 64 bits SPARC architectures if it runs Linux.
2.2.x

SPARC stands for Scalable Processor ARChitecture,
it derives from research done between 1984-1988
on the RISC architecture at UC Berkeley.
It exists 3 versions of this archiecture, SPARC-V7, SPARC-V8
( 32 bits ) and SPARC-V9 ( 64 bits ).
As you are likely to encounter a lot of implementations of
the SPARC architecture, I have summarized the main features
of theses processors.

This is Texas Instrument and Sun's brainchild, it is usualy found at clok rates around 50Mhz
featuring up to 1MB L2 cache, it is available both on single and dual processor modules
( SparcStation 10 and SparcStation 20 ). The higher clock frequency I
have encountered is 60Mhz.

On a technical point of view this is a SPARC-V8 implementation,
it is a superscalar processor,
having 2 caches, one for instruction the other one for data.

This is once again Texas Instrument and Sun's brainchild, you can find
it in the SparcStation Classic, SparcStation LX, at frequency up to
50Mhz. Its derivative the Micro SPARC II can be found in SparcStation
4, SparcStation 5 at frequencies up to 110Mhz.

On a technical point of view, its main features are a high level of
integration, having 2 caches, one for instructions, the other one for
data.

A 4KB instruction direct associative cache.

A 2KB data direct associative cache.

It is not possible to had an L2 cache.
If wish to learn more about the MicroSPARC processor you can browse
Sun's
Ultra SPARC ressources.

This processor was introduced by ROSS in 1993, it is usualy found in the
SparcStation 10, and SparcStation 20, at frequencies up to 150Mhz
( I have heard of 200Mhz dual processor modules, but Have not
witnessed one yet ). It can be found on single or dual
processor modules.

On a technical point of view it is an implementation of the SPARC-V8,
it is superscalar. It can be found with L2 cache up to 512KB

The Ultra SPARC processor is an extension of the SPARC-V9
architecture, it is a 64 bits processor, it features some video
processing instructions. It is found in all the workstation whose name
start with Ultra.

The Ultra SPARC II is an improvement of the Ultra SPARC, the
Ultra SPARCIII is actually the second generation of Ultra SPARC
processors, it was first introduced in the SunBlade 1000 Workstation.
If wish to learn more about the UltraSPARC processors you can browse
Sun's
Ultra SPARC ressources.

You may read the
CPU-Design-HOWTO, this HOWTO has a lot of interesting links
when it comes to studying the CPUs.

To summarize, the 32 bits workstations are the:

The sun4 workstation is the
sun4/330 model.

The sun4c workstations are the
SparcStation 1,2, IPC and IPX models.

The sun4m workstations are the
SparcStation 5, 10 and 20.

Only the SparcStation 10 and SparcStation 20 are SMP
capable: up to 2 CPU modules.

For more information on the SparcStation 5, 10, 20
you can read Sun's
documentation online or download it available.

PC hardware is everywhere and usualy one is quite
familiar with it, this is not exactly the case with SPARC based hardware,
even more when it comes to the innards of a workstation. The good news
is that it exists some sites on the web, where you can find pictures
of Sun hardware, with some very detailed shots, thus you should be
able to instantly identify the model and its condition prior to buy it.
The two main site where I usualy go are:

sun In Sun's database, you can find technical data as well as
picture of some of Sun's product, the pictures are crisp, and the
hardware is always at its best, this is technicaly interesting, in
order to compare brand new hardware and the used one that is usualy
featured on the two sites below.

HAL This site features very detailed pictures of a lot of
hardware, from CPU modules to Servers, even mice.

Of course if you buy first hand hardware everything should be fine,
but if you decide to go for second hand hardware, you will have to
decide how you want to buy it, and you should be able to test it by yourself.

Second hand hardware can be brought from Sun as
refurbished hardware, at auction websites, or in
specialised stores, or directly from companys that upgrade their
hardware.

When it comes to second hand hardware one has to be as cautious as
possible about the source, and the condition of that hardware.

For the source of the hardware, if you can track it, it is a very good
point. If you can't track it, it is up to you to decide if you trust
the seller or not ( If the seller cannot give you the reference of the
hardwre and if, obviously he/she is clueless about Sun hardware, you
should switch to condition red ).

Another interesting point is to see if check is accepted as a
payement.

If you can check the hardware before buying it
then first have a general look at it, search for
cracks, for stains; check the connector's pin. If this first
inspection is OK, then ask to see the inside, look for spills, watch
carefuly the connectors, then if it is OK ask to see it running,
watch carefully boot messages, issue the dmesg|more
or if it runs Solaris you can issue the more /var/adm/messages command,
and also very important listen to your computer, do you hear unusual
noises? Does it smell OK?. Then enter the OpenBoot by the
stop+a command and run some tests ( see the OpenBoot section
).
When you have decided to purchase it, it is very important that you
always make sure that the workstation you are purchasing is the one
you have tested: always keep an eye on it, do not let someone go to
the backoffice with it for example, do not accept to leave without
your workstation.

Then, when you are at home, recheck it as if it was the first time you
see it.
If it comes with CDROM drive, try to mount/umount a few CDs
and read them in order to check that device. If there is a floppy disk
read/write/format a few floppys, this should be a good test.

Of course, it exists tools to automaticaly test the hardware, but
usualy you do not have them when you need them, thus the script
below relies only on ressources provided by a Linux base system.

You should run the following script for three days, basicaly it
is going to use the CDROM, floppy and hard drive, and to reboot
the computer every 3 hours. This should stress it,

To install Linux on a SPARC based computer, should be strightforward
if you follow the informations provided by your distribution.

To boot from a floppy drive you have to have an install image on a
floppy disk and to issue the boot floppy from the OpenBoot.

If your workstation does not have a CDROM or a floppy drive, you can always try
to perform a network installation using NFS as explained by
this French document:
http://www.linux-france.org/article/materiel/sparc-install/Sparc-netinstall.html
. Basicaly, you have to set up an NFS server and to boot your
workstation using the
boot net vmlinux nfsroot=192.168.52.12:/tmp
in order to access the image that is exported by the
192.168.52.12 workstation on the /tmp directory.

If you are used to PC hardware, you are used to interact with
its BIOS. SPARC computers have an Openoot, it may seem to be like
your BIOS, but it is actually far more powerfull.
The Openoot performs the following tasks:

Testing and initializing the hardware.

Starting the operating System.

Giving you acces to a set of tools to program and to debug it.

The programming language is FCode, if you can program the Forth
langage, you can program it.

In this section, we will juste use a small set of the OpenBoot's
capabilities, in order to test hardware and to boot the system.
First you have to enter in the OpenBoot, just hit the stop
and a keys simultaneously. Then you should see a ok
prompt, if instead you see the > prompt then type
n. Now you can proceed to the next section.

An SCSI connector is located at the rear of the Workstation;
the SCA chanel is found on the internal bus of the SPARC Worstations, it
can be basicaly seen as an SCSI bus that provides power supply and
assigns SCSI ID to the peripherals.

The easiest way to install linux on SPARC workstation is to use a
CDROM. If your workstation does not have a CDROM you can plug an
external SCSI CDROM drive, but there are two things to do or you
are doomed to fail:

When you issue the boot cdrom command, the CDROM is
mapped to ID6.

Your CDROM player's block size should be setted up on 512.

As a rule of thumb, nearly all CDROM drives can be assigned to ID #6 but be
carefull about the block size setting.

The Sparc Improved Boot LOader ( SILO ), is the boot loader that is
used in the SPARC architecture. It allows you to boot Linux, Solaris
or SunOS. It can load a Linux kernel from ext2, iso9660, UFS or
ROMFS. From the SILO's README:

This is the first attempt at a complete boot loader for Linux
on the Sparc. Because of the lack of space on the bootblock, we have
to do it in two steps, the first step is a very simple loader based on
Peter Zaitcev's silo (we will call this the first stage loader) which
should fit in 512B and its sole purpose is to load a more
complete bootstrap loader, herein refered to as the second stage boot
loader. The cool thing about the second stage loader we implemented is
that it makes use of the ext2 library (provided with the ext2fs tools) and
some ufs code, and thus allows the loader to access any file on a ext2 fs
and ufs, uses silo.conf, handles gunzipping and a lot of other things.
This is different from Linux/i386 lilo which needs a map for each
kernel. In silo we just keep one map file for the second stage
loader, we don't expect you to be changing the second stage loader on
your daily routine (you can do so, you will just need to use a tool to
reinstall the maps).

Most of the sun4m workstation have a special connector for the
keyboard. In this case the mouse is connected indifferently to
left or the right side of the keyboard. Some workstations have a
PS2 connector, it is very easy to spot the difference.
The keyboards you are the more likely to encounter are the type4 and type5.

The SparcStation 10 and SparcStations 20 are SMP capable machine and
according to the
FAQABOSS
the following combinations are known to work :

2xSM40 ( model 402 )

2xSM41 ( model 412 )

2xSM51 ( model 512 )

2xSM512 ( model 514 )

2xSM61 ( model 612 )

2xSM71 ( model 712 )

2xSM81 ( model 812 )

And, as stated earlier, CPU modules in SparcStations 10 and can run a
different clock speeds, the following ones __SHOULD__ work:

2xSM50

SM41, SM51

SM41, SM61

SM51, SM61

SM71, SM81

If you want to learn more about SMP and Linux you can read the
SMP-HOWTO

How does it performs? Well, it is fast, really fast. Some of the java
Demos can run faster on a dual HyperSparc 125Mhz 128MB ( ywing ) than on a dual
celeron BP6 433@433Mhz 192MB ( calimero ). The same applies for the Gimp. When it
comes to compiling calimero runs faster than ywing. Both computers
running 2.2.16 kernel and calimero's hard disk subsystem is full SCSI.

One important detail when you plan to have different CPU modules in
your computer is to have the same kind of modules, you cannot mix
SuperSparc and HyperSparc for example, but you can have an odd number
of CPUs, for example 3. They are said to be able to run modules
at different clock speed as written in this article form
AcesHardware
, but I have not witnessed it.

I plan to upgrade ywing to 4 CPU in order to see how the performance
scales.

The sound is supposed to work under Linux, using the ioctl application.
On my SparcStation 20, the sound works fine under Solaris8, but I have not yet managed to hear
anything under Linux ( The Sound of Silence? ).

You can read the Linux/Sparc audio webpage at
sparcaudio for more informations.

The following sites are given for your information, I am independent
from them and does not represent them. If you would like to suggest a
website or to add any information do not hesitate to email me.

This documentation is distributed in the hope that it will be useful, but without any warranty. The information in this document is correct to the best of my knowledge, but there's a always a chance I've made some mistakes, so don't follow everything too blindly, especially if it seems wrong. Nothing here should have a detrimental effect on your computer, but just in case I take no responsibility for any damages ocurred
from the use of the information contained herein.

In this document you will encounter some commercial products and
brands. Theses products are cited for information purpose, it is not
an endorsement from the author. The trademarks belong to their respective
owners.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with the Invariant Sections being :
"Copyright, Disclaimer and Trademarks"
"Preface.",
"SPARC, which one ?",
"Buying a SPARC workstation.",
"Linux on SPARC: 2 kernels.",
"Choosing a distribution.",
"Working with the Openboot.",
"Hard drive buses.",
"CDROM: specific settings.quot;,
"SILO.",
"Keyboard and mouse.",
"X Window.",
"SMP.",
"The sound.",
"Serial port.",
"Ressources.",
"Thanks.",
"Revision History.",

, with the
Front-Cover Texts being "title" and "abstract."
, and with no Back-Cover Texts .