The IDPROM contents are invalid


 
I like my old Sun machines, but they have a small weakness in their design.  The older machines use a real-time clock known as an "IDPROM".  This device, originally made by Dallas Semiconductor has RAM, Clock, Crystal and a Battery all in one package.  If you read that back, you will see the problem: "Battery"

The battery has a lifetime in years, but when it goes, the machine loses everything stored in the IDPROM.  The problem is that this data includes the MAC address, Host ID, Serial Number and even system type.  Without this data, your machine won't boot; and if it does, you won't have network access in all likelihood.

Now, the chip is in a socket, because Sun knew it would fail and need replacement in the field, and while some devices (M48T02 and M48T58) are still available, other common devices, especially the M48T59 are no longer available, and there aren't and pin-compatible alternatives that I can find.
 
There are instructions online showing how to attack the device with a Dremel and attach an external battery.  As I don't have any devices to spare I am loath to try this.  I my next plan fails, I might try getting a used device and cutting it up.

I am considering making a small PCB which would adapt a 48T58 to the 48T59 pinout, and I've shown a prototype design below.  There are a couple of differences which I had to account for, namely that the '59 uses a single "E" signal, and generates a RESET which the '58 does not.  The solution to the single "E" is just to tie E1 to +5V and use E2.  I tied the RESET output to +5V and hope that no machine actually relies on it but time will tell.  Scanning the datasheets tells me that the programming is essentially the same, but the '59 has a watchdog timer, alarm and interrupts.  I can't find a reference in Sun's documentation to these features, so I am hoping they are not used.


So anyway, assuming we can replace the device by fair means or foul we need to reprogram the device, and this can get complicated.  If you have an older SPARCStation machine, the following link is your go-to:

http://www.obsolyte.com/sunFAQ/faq_nvram.html

The instructions there work fine.

But for the Sun Blade 100, it's a different access method, and here's a process which I have tested personally:

First make sure you have a keyboard, mouse and monitor connected.  Without a keyboard, the system will default to using ttya (serial port 1) and you will get a black screen which might confuse you.

After power is on, you will get the OpenBoot messages, and the IDPROM error.  With this machine, the IDPROM is on the PCI bus, so we need to access it differently, the "mkp" command from obsolyte won't work.
 
There's a couple of useful commands to use before we get started.  First of all, establish system defaults with
 
"set-defaults"

and I prefer to stop the system from auto-booting until I am ready.  Do this with:

"setenv auto-boot? false"

Use "show-devs" to list all the devices installed

There's a lot of information, but the line you are looking for is:

/pci@1f,0/ebus@c/eeprom@1,0

Your address might vary (unlikely), but check it carefully.  This is the device path of the chip.  Curiously, there is also an "idprom" entry but that doesn't appear to be usable.

Now change to the EEPROM device path with:

"cd /pci@1f,0/ebus@c/eeprom@1,0"

Use ".properties" to get it's details.  You will get back something similar to:

model       mk48t59
address     fff58000
reg         00000001  00000000  00002000
device_type nvram
name        eeprom

Make a note of the value of "address"  This is correct for a SunBlade, but it might differ for other systems.

Now we have to make this memory accessible for use.  First we have to find the physical address:

"fff58000 map?"

The output looks like this:

VA:fff58000
G:0 W:1 P:1 E:1 CV:0 CP:0 L:0 Soft1:1 PA[40:13]:fff88000 PA:1fff1000000
Diag:0 Soft2:0 IE:0 NFO:0 Size:0 V:1
PA:1fff1000000

VA is the virtual address, so we need the Physical Address.  This is the value of "PA".  Now map it with:

"1fff1000000 0 0 map-page"

The data in the device is organised as follows:
 
Address      Purpose
0x00          Must be 0x01
0x01          Machine Type, and first serial num byte (0x83 for a SunBlade)
0x02          MSB of MAC Address
0x03          MAC Address #2
0x04          MAC Address #3
0x05          MAC Address #4
0x06          MAC Address #5
0x07          LSB of MAC Address
0x08          Date Code #1
0x09          Date Code #2
0x0A          Date Code #3
0x0B          Date Code #4
0x0C          Serial Number #2
0x0D          Serial Number #3
0x0E          Serial Number #4
0x0F          Checksum

The checksum is important, because if you get it wrong you still get "Invalid IDPROM messages".  Fortunately it is just a bitwise-XOR of the first 15 bytes of data

After that brief diversion, my machine has a MAC address of:
00:03:ba:09:57:d0 and a serial number 830957d0.  I recovered the manufacture date code from the barcode as 00-00-03-ba (don't know what it means though)
 
According to the datasheets, the location we want to be working on starts at 0x1fd8, so now we enter the data into the console at the "ok" prompt.  Note that the console uses something akin to Forth, so the commands may seem a little backwards.  Just enter the xx xxxx c! lines, the rest are explanations
 
The signature:
01 1fd8 c!
Machine Type:
83 1fd9 c!
MAC Address:
00 1fda c!
03 1fdb c!
ba 1fdc c!
09 1fdd c!
57 1fde c!
d0 1fdf c!
Date Code:
00 1fe0 c!
00 1fe1 c!
03 1fe2 c!
ba 1fe3 c!
Host ID:
09 1fe4 c!
57 1fe5 c!
d0 1fe6 c!
Finally, the checksum:
82 1fe7 c!

So, with all this done, you can reset the machine with:

"reset-all"

Then boot manually and you should be good to go.
 
Enjoy!

Supplement: Some machine type values:

0x31 = 386i
0x51 = SPARCStation 1
0x52 = SPARCStation IPC
0x53 = SPARCStation 1+
0x54 = SPARCStation SLC
0x54 = SPARCStation 2
0x56 = SPARCStation ELC
0x57 = SPARCStation IPX
0x61 = 4/E
0x51 = SPARCStation 10 or 20
0x80 = Ultra 1, Enterprise 220R, Voyager, SS1000
0x83 = Sun Blade 100

Comments

Popular posts from this blog

The QYT KT-7900D

Recording weather with Arduino, Elasticsearch and Kibana

Exploring Solar Power - Let there be smoke!