Sun 3/80 NVRAM

The Sun 3/80 was the first Sun which used a NVRAM instead of an EEPROM (to store the settings which can be viewed and changed by the "eeprom" command) and a PROM (machine type, serial number and ethernet address) to store the hardware settings.

Picture (46 kByte): Sun 3/80 back

To open the case of the 3/80 remove the screws marked red. The graphics card is fastened with the screws marked blue.

Picture (43 kByte): Sun 3/80 open

Now open the flap.

The NVRAM is sitting on the mainboard in the left rear corner. It does have a yellow/orange sticker with a barcore. It's simply a battery buffered memory, and this battery (a 3V lithium battery) fails within 4-6 years. The chip contains a hardware clock too.

Picture (99 kByte): Sun 3/80 Motherboard

This is the motherboard of the 3/80. The graphics card is already removed. The NVRAM is marked blue.


The Symptoms of a failing NVRAM become effective after a power cycle or power failure: Picture (20 kByte): Error message


If your NVRAM is still ok, make a copy to the harddisk immediately. This will help you to restore the correct value in case of failure.

Enter as root:

# dd if=/dev/eeprom of=/var/adm/eeprom.contents bs=1 count=2040

Repairing the NVRAM

A new NVRAM is hard to find and expensive. But it is easy to refurbish the old one, because it's only the battery which is dead. The battery sits in the plastic top of the chip.

Fetch the following things:

Take out the graphics card. It is fastened with two screws at the P4 connector and with two bigger screws at the rear. Pull out the card by gently tearing near the connector until it pops out. Remove the NVRAM now. Pin1 is marked by a white dot.
           1 1 1 0 0 0 0 0 0 0 0 0
           2 1 0 9 8 7 6 5 4 3 2 1 
front-  > |  +----------------+  o<-- white dot
side    > |  !      XXXX      |   |
to      > |  !  ||||||||||||  |<----- yellow sticker 
scratch > |  +----------------+   |   with barcode and
          +-----------------------+   four digit
           1 1 1 1 1 1 1 2 2 2 2 2    id-number
           3 4 5 6 7 8 9 0 1 2 3 4
The plastic container for the battery is fastened on top of the real chip with a plastic mass on both short sides. Scratch that mass away on pin-1's opposite side (which is the side between pin 12 and 13) until two metal stripes become visible. Carefully scratch away more of the mass so you can easlily solder the cables to the metal stripes. One of the stripes is connected to pin 12 (GND).

Solder the two cables to the stripes. Of course you can solder the one cable to pin 12 instead to the corresponding stripe.

Picture (54 kByte): solder points

Here is the NVRAM seen from below. One cable is soldered to pin 12 (red) which we know is connected to the one stripe (red too). The other cable needs to be soldered to the other stripe (blue).

Then solder the battery to the wires. - comes to pin 12, + to the other metal stripe. Double check polarity of the battery!!!

Tip:The surface of the battery takes solder much better, if you scratch it with a sharp tool. Too much heating with the solder iron may kill the battery.

Let the battery cool down and cover it with adhesive tape. Carefully bend the cables so the battery lies on the NVRAM.

Put the NVRAM back into it's socket (look for the correct direction) and put the graphics card back into the slot. The battery should now be fastened between the NVRAM and the graphics card.

Make the machine work again

Now the NVRAM is ok, but empty. The 3/80 will refuse to work without a properly filled NVRAM.

For your pleasure, you should connect the terminal to serial port A. Settings: 9600 baud, 8 bit, no parity. You probably will need a null modem cable (2x3,4x5,6+8x20,7-7) too. This allows you to watch the diagnosis output. If you have no terminal handy, you have to wait until the monitor gets bright. This will last a while. Now enter the PROM monitor by pressing L1-A.

As long as the IDPROM contains unusable data, the machine refuses to boot, neiter from the net (which is a bad idea with a broadcast ethernet address anyway) nor from hard disk. We'll fill it with randomly choosen data. If you have a copy of the NVRAM contens or at least the ethernet address and/or the serial number, you can fix that later.

At the Monitor prompt, enter the following:

> q70b (return)
70b=00? 6 (return)
70c=00? (Ctrl-C) (return)
> ^t fef04000 (return)
Hint: ^ is ASCII character 0x5e or Shift-6.
You'll get output which includes the following (samples included)
TIA entry = 33FA500
TIB entry = 33FB80A
PTE = 64000049
Write these values down!!!

Change the TIA entry for fedfa000 to match the above

m a fedfa000 (return)
TIA MAP FEDFA000 [...] ? 33FA500 (return)
Hit (Ctrl-C) (return) at next ? prompt

Now change the TIB entry to match the above

> m b fedfa000 (return)
TIB MAP FEDFA000 [...] ? 33FB80A (return)
Hit (Ctrl-C) (return) at next ? prompt

Last, but not least change the pagemap entry to match the above

> p fedfa000 (return)
PageMap FEDFA000 [...] ? 64000049 (return)
Hit (Ctrl-C) (return) at next ? prompt
> o fedfa7d8 (return)
At this point you can enter the new IDPROM values. You need to get the checksum right. If you don't, you still won't be able to boot.

byte          contents
fedfa7d8      version number - always 01
fedfa7d9      first byte of hostid (system type, 42 for sun 3/80)
fedfa7da-df   6 byte ethernet address (first three bytes are 08,00,20)
fedfa7e0-e3   date of manufacture. Often all 0s
fedfa7e4      second byte of hostid (high byte of serial number)
fedfa7e5      third byte of hostid (middle byte of serial number)
fedfa7e6      fourth byte of hostid (low byte of serial number)
fedfa7e7      idprom checksum  - xor of contents of bytes d8-e6
Click here to get some random values and a checksum calculated.

If you power cycle the machine, it shouldn't spit out the diagnosis messages anymore and be able to boot from disk.

Restore the data of the NVRAM

You can praise yourself lucky, if you have made a copy of the NVRAM contens earlier with "dd". The following command restores the NVRAM data:
# dd if=/var/adm/eeprom.contents of=/dev/eeprom bs=1 count=2040
# halt
Stop the machine with the "halt" command and power cycle it. Now it should show the correct ethernet address at the start. You're done.

Unlucky people (without a backup copy of the NVRAM) still need suitable data for the 3/80.

Find suitable data for the NVRAM

If you can live with the randomly generated values, there should be no problem with this. But if you want to restore the original ethernet address or serial number, it is much easier to fire up SunOS, read out /dev/eeprom, modify it with your favourite hex editor (i can recommend "beav"; it is in emacs style) and write it back.

Here is the procedure to read the NVRAM again:

# dd if=/dev/eeprom of=/var/adm/eeprom.contents bs=1 count=2040
It is essential to get the checksum at 0x7e7 correct. If you're not good in computing hex values (like me), you can use this tiny C program:
        unsigned char x,y;
        int i;


Save this program as xor.c and compile it:
# gcc xor.c -o xor
Enter the hex values from 0x7d8 to 0x7e6:
# ./xor
01 42 08 00 20 07 ed aa 24 74 ec 43 00 50 18
The last value (0x9c) is the checksum that needs to be placed at 0x7e7.

You're almost done now. Write back the contents and stop the machine:

# dd if=/var/adm/ of=/dev/eeprom bs=1 count=2040
# halt
Power cylce the machine and look for the correct ethernet address.

What else?

If the machine complains about "wrong checksum" if you give the command "eeprom", enter "eeprom -c" to fix this. It's not the checksum at 0x7e7 but another one.

If you can't find the ethernet address and/or serial number of your 3/80, then there is a last possibility: Sun does have a database of NVRAM contents. You need the four alphanumeric characters on the yellow sticker under the barcode and a friendly Sun hotline operator.

Long live the Sun 3/80

I think the NVRAM is a major design fault. It is a source of grief not only for the 3/80 series but all early SPARC machines too.

Disclaimer: If anything breaks, don't blame me.

I hope that my NVRAM repair manual will help you to revive your 3/80. I have fixed more than 10 NVRAMs now and so some 3/80 can survive some more years.

Peter Koch