Mine has a yellow label on top with a bar code and "BA0F" printed on it. These could be a checksum for whatever it once contained. Who knows?
I remove mine from the socket and study it. The underside of this chip is marked "48T02".
The unit is a M48T02, made by ST electronics. A 25 page datasheet is available that covers both this chip and a M48T12. The only difference I can find is that the "12" operates over a slightly wider range of supply voltages.
The unit is a 2K by 8 static ram (with battery backup) along with a time of day (TOD) clock. The datasheet says it is compatible with a DS1642. They say the battery will last at least 10 years.
A 2K static ram goes from 0 to 0x7ff. The clock registers are at the end of the chip and hide the last few bytes of the static ram. They are at 7F8h-7FFh. The control register is first at 0x7f8.
There is possible confused nomenclature. Sometimes this device is refered to as NVRAM, IDPROM, or EEPROM. You have to take care and figure out from context what is being talked about.
The Sun 3/80 uses the following addresses:
EEPROM -- 0x6400_0000 (0xfef0_4000 virtual) TOD -- 0x6400_07f8 (0xfef0_6000 virtual)The bootrom also mentions an IDPROM at the following address. This may be on the Sun 3/470. The bootrom never accesses these addresses and I don't see any chip that relates to this.
IDPROM -- 0x6100_0C00 (0xfef1_cc00 virtual)
You can see light between the battery and the chip. There is a thin gap. The battery is held only at the ends. There are important wires buried in those tabs, so don't do anything drastic without reading further.
Hopefully you have carefully read some of the links above before going any further. I began cutting the tabs at the end of the unit, then stopped midway along and read some descriptions of how people have done this. If I had continued and detached the cap, I would not have had much chance of fixing the device. I would have cut critical wires that are embedded in the plastic tabs at the ends of the unit. Hopefully I stopped in time.These are available on Digikey (as of November, 2024) and cost $22.
The crystal is in the end which has a white dot. A good strategy is to leave that entirely alone. What some people do is to saw the battery in half, which leaves the part with the crystal intact. I use a dremel tool with a cutting disk to carefully cut the tabs at each end that hold the battery. Since the battery will be discarded, it do my cutting as high as possible in order not to damage the chip itself. This is a local copy of:
Enter as root:
# dd if=3D/dev/eeprom of=3D/var/adm/eeprom.contents bs=3D1 count=3D2= 040
Fetch the following things:
1 1 1 0 0 0 0 0 0 0 0 0 2 1 0 9 8 7 6 5 4 3 2 1=20 +-----------------------+ front- > | +----------------+ o<-- white dot side > | ! XXXX | | to > | ! |||||||||||| |<----- yellow sticker=20 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 4The 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 meta= l stripes become visible. Carefully scratch away more of the mass so you ca= n easlily solder the cables to the metal stripes. One of the stripes is con= nected 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.
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 cab= le needs to be soldered to the other stripe (blue).
Then solder the battery to the wires. - comes to pin 12, + to the othe= r 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 ki= ll the battery.
Let the battery cool down and cover it with adhesive tape. Carefully b= end the cables so the battery lies on the NVRAM.
Put the NVRAM back into it's socket (look for the correct direction) a= nd put the graphics card back into the slot. The battery should now be fast= ened between the NVRAM and the graphics card.
For your pleasure, you should connect the terminal to serial port A. S= ettings: 9600 baud, 8 bit, no parity. You probably will need a null modem c= able (2x3,4x5,6+8x20,7-7) too. This allows you to watch the diagnosis outpu= t. If you have no terminal handy, you have to wait until the monitor gets b= right. 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 b= oot, neiter from the net (which is a bad idea with a broadcast ethernet add= ress 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 an= d/or the serial number, you can fix that later.
At the Monitor prompt, enter the following:
> q70b (return) 70b=3D00? 6 (return) 70c=3D00? (Ctrl-C) (return) > ^t fef04000 (return)Hint: ^ is ASCII character 0x5e or Shift-6.
TIA entry =3D 33FA500 TIB entry =3D 33FB80A PTE =3D 64000049Write 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 th= e 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-e6Click here = to get some random values and a checksum calculated.
If you power cycle the machine, it shouldn't spit out the diagnosis me= ssages anymore and be able to boot from disk.
# dd if=3D/var/adm/eeprom.contents of=3D/dev/eeprom bs=3D1 count=3D2= 040 # haltStop the machine with the "halt" command and power cycle it. Now it s= hould show the correct ethernet address at the start. You're done.
Unlucky people (without a backup copy of the NVRAM) still need suitabl= e data for the 3/80.
Here is the procedure to read the NVRAM again:
# dd if=3D/dev/eeprom of=3D/var/adm/eeprom.contents bs=3D1 count=3D2= 040It is essential to get the checksum at 0x7e7 correct. If you're not g= ood in computing hex values (like me), you can use this tiny C program:
#include=20 main() { unsigned char x,y; int i; x=3D0; while(1) { scanf("%x",&i); y=3Di; x^=3Dy; printf("%x\n",x); } }Save this program as xor.c and compile it:
# gcc xor.c -o xorEnter the hex values from 0x7d8 to 0x7e6:
# ./xor 01 42 08 00 20 07 ed aa 24 74 ec 43 00 50 18 1 43 4b 4b 6b 6c 81 2b f 7b 97 d4 d4 84 9cThe last value (0x9c) is the checksum that needs to be placed at 0x7e= 7.
You're almost done now. Write back the contents and stop the machine:<= /p>
# dd if=3D/var/adm/eeprom.new of=3D/dev/eeprom bs=3D1 count=3D2040 # haltPower cylce the machine and look for the correct ethernet address.
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 con= tents. You need the four alphanumeric characters on the yellow sticker unde= r the barcode and a friendly Sun hotline operator.
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