USE THIS AT YOUR OWN RISK. IF THIS INFORMATION IS ABUSED OR INCORRECT
YOU CAN RENDER YOUR COMPUTER UNBOOTABLE AND MY BET IS THAT SUN WILL
CHARGE A LOT OF MONEY TO FIX THE DAMAGE.
 
Be careful, mistakes can cost a lot.
 
The information in this document is distributed in the hope that
it will be useful, but without any warranty; without even the
implied warranty of merchantability or fitness for a particular
purpose. You use this document at your own risk. The author
disclaims responsibility for any damages that might result from the
use of this document, even if they result from negligence or errors
on the part of the author.
 
Placed in the public domain by the author - Dec 1995
- Mark Henderson <mch@squirrel.com>

Thanks to Kevin Murty for the use of an SS1000 (and to the Sun FE
Handbook for the magic "update-system-idprom" command). Other contributors
are noted in the body of the text.

I've broken this document into the following parts.

I.      Introduction and Hardware
II.     General sun4c, sun4m, sun4d IDPROM Programming
III.    A Quick-and-Dirty Guide to Restoring the NVRAM of a sun4c Machine
        (SPARC 1/1+/2/IPX/IPC/ELC/SLC)
IV.     The Sun 3/80
V.      Examples
VI.     Odds and Ends

-----

I.      Introduction and Hardware

Every Sun 3/80, sun4c, and sun4m architecture machine contains an NVRAM
chip. This NVRAM chip stores various configuration parameters (e.g.
boot device, amount of RAM to test), maintains the clock, and also
contains the IDPROM data, which is composed of the ethernet address,
date of manufacture, hostid, a version number, and a checksum.  The
name IDPROM is historical.  On older machines (sun2, sun3) the hostid
and ethernet address were stored in a PROM

sun4d machines (e.g. SS1000) also have an NVRAM chip. However, the
IDPROM information is stored in a flash EEPROM and is downloaded into
the NVRAM during POST. You can also upload information from the NVRAM
chip to the flash EEPROM. So you can change the value of the flash
EEPROM by merely changing the NVRAM and uploading the new values.

At this point I have no information on the new UltraSPARC machines.

This document is for people who want to accomplish one of the
following tasks

1. Install a virgin NVRAM chip in a Sun 3/80, sun4c, or sun4m machine. 
   Usually this will be due to NVRAM failure or loss of the NVRAM password in
   full security mode.
2. Change the hostid/ethernet address of a Sun 3/80, sun4c, sun4m, or
   sun4d machine.
3. Restore a machine with a corrupted NVRAM chip in a Sun 3/80, sun4c,
   or sun4m machine to working order.

I'm going to focus on methods that involve reprogramming the chip from
the FORTH OPENPROM monitor ("ok" prompt).

The NVRAM chip has a usually will have a barcode on it (except for
sun4d).  Given the barcode, Sun can reconstruct your original hostid
and ethernet address. I have no idea how this is done, but the barcode
serves as an easy way to identify the chip.

The NVRAM chips are SGS-Thomson Timekeeper (formerly Mostek) chips. They
contain an embedded battery with a fixed life. When the machine is off,
the battery runs down.  It is very common for the battery embedded in
the Timekeeper chip in an older Sun (sun4c, sun3x) to fail.

    Architecture        Chip Type
    sun3x (3/80)        M48T02
    sun4c               M48T02
    sun4m               M48T08
    sun4d               M48T08
    sun4u               M48T08


These chips come in various speeds. The SGS-Thomson part numbers are
M48T02-200PC1 for the 200ns M48T02, M48T08-100PC1 for the 100ns M48T08.
200ns is adequate for any Sun, but often the faster chips are easier to
come by, and there is no harm in buying them. If you have trouble
tracking down a local SGS-Thomson distributor, Mauser electronics sells
the SGS-Thomson Timekeeper chips (800-346-6873, 817-483-5712). The
Mauser part numbers as of 1995 are slighly different and are as
follows:

Part no.            Mauser part no.     speed         capacity
M48T02-200PC1       511-M48T02-20PC1    200ns   M48T02  2kB
M48T02-150PC1       511-M48T02-15PC1    150ns   M48T02  2kB
M48T02-120PC1       511-M48T02-12PC1    120ns   M48T02  2kB
M48T08-150PC1       511-M48T08-15PC1    150ns   M48T08  8kB
M48T08-100PC1       511-M48T08-10PC1    100ns   M48T08  8kB

As of Oct 1995, the prices for these chips from Mauser range from
US$16.00-23.12.  I have no affiliation with Mauser other than as a
customer

Dallas Semicondutor makes a clone of the SGS-Thomson M48T02 chips, the
DS1642.  I've had mixed experience using the Dallas chips in a Sun. My
experience is that these chips do NOT work properly in the following
machines:  3/80, SS2, IPX (they fail POST, but otherwise seem OK)

However, I have successfully used them in an SS1 and an IPC.

I have no idea whether the Dallas chips work properly in the following:
SLC, ELC, SS1+

You can order these chips in 120ns or 150ns speeds (150ns is fine)
directly from Dallas in quantities up to 10 by calling 1-800-336-6933
and giving Dallas a credit card number.  Data sheets and distrubutor
lists for Dallas are available from http://www.dalsemi.com

-----
II.     General sun4c, sun4m, sun4d IDPROM Programming

If you have a valid NVRAM chip installed (IDPROM is ok) then
before doing anything else, write down a copy of the nvram IDPROM
information. You can get it under Sun OS 4.1.x by running
/usr/etc/devinfo -vp (on Solaris 2.x, /usr/sbin/prtconf -vp) or at
the Openprom monitor "ok" prompt by typing the command
.idprom
(yes the "." is part of the command)
You'll need this information if the NVRAM gets screwed up and you need
to try and back out. 

Step 1.
Determine the physical address of the NVRAM (in the case of Sun4m machines
I'm interested in the second page). If you're system is on this table you 
can just read it off the table and skip to step 2.

                                addr        space       arch
SS1,SS1+,SS2,ELC,IPC,IPX,SLC    02000000    obio        sun4c
Classic,LX,SS5,SS4,Voyager      71201000    0           sun4m
SS20,SS10                       f1201000    f           sun4m
SS1000                          00281000    f           sun4d

Thanks to weindlin@pcs.mot.com for supplying some of the data in 
this table.

If your system is not in the table, and you are running Sun OS 4.1.x, do 
the following (Solaris 2.4 instructions follow in Step 1b):

Step 1a. (Sun OS 4.1.x)

While Sun OS 4.1.x is running (and while the system is idle!!) do the 
following. Modify the instructions accordingly if you have some of 
the security features installed.

hold down the L1/Stop key and type a 
you will get a prompt which says
ok

For Sun4m machines:
type the command
fefff000 pgmap?

the output will list a physical address which might look like
f.f120.1000

the part before the first dot is the address space and the rest is
the actual address. This is the SS20 case from the above table.

Now type 
go
to resume Sun OS operation.
--

For sun4c machines:
type the command
ffff8000 pgmap?

the physical address will probably list a space (in the ELC case the
address space is given as I/O) and an address (again for the ELC
02000000).

the monitor will want you to type in this address space as obio
later. The Sun Openprom manual also gives sbus and obmem as possible
address spaces.

Now type
go
to resume Sun OS operation.
--

At this point if you're really nice, you'll send me an Email message
with your Sun model and physical address/address space so I can add it 
to my table. Indicate whether or not you want me to give credit. Unless
you ask me not to, I'll credit you just below the table.


--

Step 1b. (Solaris 2.4)

Solaris 2.4 instructions for determining the physical address of the
NVRAM (sun4c/m/d).

0. If you are running a sun4m or sun4d machine (not sun4c) get the
   eeprom driver from the Solaris 2.4/2.5 distribution disk. You'll need
   to copy this driver into /kernel/drv (you should find it in
   /cdrom_root_dir/export/exec/kvm/sparc.sun4c.Solaris_2.4/kernel/drv/eeprom
   or 
   /cdrom_root_dir/export/exec/kvm/sparc.Solaris_2.5/platform/sun4c/kernel/drv/eeprom

   Then do a 
   mknod /dev/eeprom c 68 11

1. make sure the eeprom driver is loaded. An easy way to do this is to
   cp /dev/eeprom /dev/null

2. execute
   /usr/sbin/prtconf -vp 

   and look for the information on eeprom
   which should look something like:

    Node 0xffec068c
        name:  'eeprom'
        model:  'mk48t02'
        reg:  00000001.f2000000.00000800
        address:  ffd04000      (*** note this address ***)

3. Press STOP-A to stop the machine

4. at the ok prompt type
   ffd04000 pgmap?      (replace ffd04000 with the address given by prtconf)

5. you'll get output which specifies an address space and a physical address.

e.g. sun4c output looks something like: 
Onboard I/O Physical: 2000000 ...

so the address space is I/O
Physical address is 2000000

6. Now type
go
at the ok prompt to resume Sun OS operation.

--

Step 2. 

From this point on it doesn't matter what version of Solaris you
are running.

Shut down  your system (e.g. with /etc/halt, init 0)

--

Step 3. 

If your IDPROM data is valid, make sure you wrote down your original 
IDPROM info. You can get it by typing .idprom now. 

Figure out what your desired hostid and ethernet address are. Note that
you shouldn't change either the first hex byte of the hostid or the
first three bytes of the ethernet address. Doing so can cause problems.

For folks installing a virgin NVRAM, get the first byte of the hostid
from the table at the bottom of this section. The first three bytes
of the ethernet address should be (in hex) 08,00,20.

--
Step 4. 

Map the physical address determined in step 1 to virtual address 0
using the map-page command. The format of the command (type it at the
"ok" prompt) is:

<physical address>  <address space>  <map_to>  map-page

e.g. ELC     02000000    obio 0   map-page
     SS20    f1201000    f    0   map-page
     Classic 71201000    0    0   map-page
     SS1000  00281000    f    0   map-page

--
Step 5. 

If you are installing a virgin NVRAM type
set-defaults
Generally a machine will reset the NVRAM to the default values (excluding
the IDPROM information) when it detects a virgin NVRAM. Still, it is
good to do a "set-defaults" just in case this fails.

On a sun4c machine, the virtual address of your IDPROM is 7d8. On a 
sun4d or sun4m machine it is fd8.

If you are working from a valid or mostly valid IDPROM field, then 
type either
7d8 20 dump
for sun4c
or 
fd8 20 dump
for sun4m/d

as appropriate.

--
Step 6. 

The information which starts at f/7d8 is as follows:
byte    contents
d8      01    - version number - always 01
d9      first byte of hostid (system type)
da-df   6 byte ethernet address (first three bytes are 08,00,20)
e0-e3   date of manufacture. Often all 0s. Doesn't matter.
e4      second byte of hostid
e5      third byte of hostid
e6      fourth byte of hostid
e7      IDPROM checksum  - xor of contents of bytes d8-e6

Unless you are installing a virgin NVRAM, verify that the information
the dump command spits out is consistent with the above and if not, DO NOT
PROCEED.

Stephen Dowdy <dowdy@cs.colorado.edu> has contributed the following
Forth program which can be run directly from the openprom monitor to
calculate the NVRAM checksum. Works nicely.

Change the 7d8 to fd8 for sun4m/d.

    : idpcsum           ( Print IDPROM CheckSum value )
      hex               ( set base 16 )
      7d8 dup c@       ( set first address, get value )
      e 0 do            ( for remaining 14 addresses...)
        swap 1+ dup c@ rot xor  ( inc ptr, get value, XOR )
      loop              ( continue )
      ." Checksum should be " . ( print value )
    ;


--
Step 7. 

Now you can make changes. Be very careful and be sure to compute the
checksum after making changes. If you don't, you'll get nasty warnings
about an incorrect IDPROM checksum on boot. I'm know repeating myself,
but don't change the first byte of the hostid to something that doesn't
correspond to your system type (see table below) or the first three
bytes of the ethernet address from (0x08,0x00,0x20). The first byte of
the hostid is often used to determine the architecture when booting
from CDROM on most current Sun models. If you alter the first three
bytes of the ethernet address you might get message which say that you
have a defective motherboard (but then I don't know of any other
consequences of changing this to some _reasonable_ value, especially
avoid ff:ff:ff:ff:ff:ff !)

The openprom command to change a single byte is

<value> <addr> c!
e.g.
44 7dd c!
will change byte 7dd (virtual address) to 44.

7d8 20 dump      
or
fd8 20 dump
will give you a listing of this area of NVRAM.


--
Step 8.

 If you are on an SS1000, type
 update-system-idprom 
 at the ok prompt.

 For any of the above machines, now type reset at the ok prompt. You 
 should then reboot with your new hostid/enet addr. 

--
Here's a table which matches system models with the first byte of the
hostid. This is from a posting to comp.sys.sun.admin by
Andy.Behrens@coat.com

    01  2/1x0
    02  2/50
    11  3/160
    12  3/50
    13  3/2x0
    14  3/110
    17  3/60
    18  3/e
    21  4/2x0
    22  4/1x0
    23  4/3x0
    24  4/4x0
    31  386i/150 or 386i/250
    41  3/4x0
    42  3/80
    51  SPARCstation 1   (4/60)
    52  SPARCstation IPC (4/40)
    53  SPARCstation 1+  (4/65)
    54  SPARCstation SLC (4/20)
    55  SPARCstation 2   (4/75)
    56  SPARCstation ELC (4/25)
    57  SPARCstation IPX (4/50)
    61  4/e
    71  4/6x0   (670)
    72  SPARCstation 10,20
    80  SPARCclassic, LX, SPARC 5, SPARC 4, SS1000, Voyager


-----
III.    A Quick-and-Dirty Guide to Restoring the NVRAM of a sun4c Machine
        (SPARC 1/1+/2/IPX/IPC/ELC/SLC)

This is for folks who need to replace their NVRAM chip in a sun4c
machine and don't want to bother with cumbersome XOR calculations.
I am assuming that you want to replace your NVRAM chip, and you have
a virgin NVRAM chip in hand.

All numbers below are in hex.

Turn off the machine. Remove the old NVRAM chip (note the
orientation).  Insert the new NVRAM chip. Be sure to insert it in the
correct orientation as installing it in the wrong orientation and
powering on the machine will generally destroy the chip. Power up the
machine and bring it to the "ok" prompt.

now at the "ok" prompt...
set-defaults
setenv diag-switch? false
02000000 obio 0 map-page

If you have your original hostid and ethernet address and want to
restore it, you're going to have to do the xor computation to get the
IDPROM checksum (see section II. - to do the XOR computations you can
use the CDE dtcalc, an HP 16C, perl, C, or just do them by hand). 

However, if you don't care too much about getting the exact same
values, the following is easy and just gives you the IDPROM checksum of
29.

Choose three one byte values, H1, H2 and H3. These will be the last
three bytes of your hostid and ethernet address. You should not
have two machines with the same ethernet address on the same subnet.

Get H0 from the following table (system type byte - more detailed table
above)

    H0  SYSTEM TYPE
    51  SPARCstation 1   (4/60)
    52  SPARCstation IPC (4/40)
    53  SPARCstation 1+  (4/65)
    54  SPARCstation SLC (4/20)
    55  SPARCstation 2   (4/75)
    56  SPARCstation ELC (4/25)
    57  SPARCstation IPX (4/50)

now fill in the NVRAM as follows, substituting your values for H0, H1, H2,
and H3 for the strings H0, H1, H2, H3. Keep in mind that all numbers are 
in hex.

01 7d8 c!
H0 7d9 c!
08 7da c!
0 7db c!
20 7dc c!
H1 7dd c!
H2 7de c!
H3 7df c!
H0 7e0 c!
0 7e1 c!
0 7e2 c!
0 7e3 c!
H1 7e4 c!
H2 7e5 c!
H3 7e6 c!
29 7e7 c!   

Then do a "reset" at the "ok" prompt. If you got everything right, the
system should boot and shouldn't complain about the IDPROM checksum during
the power on self test.

The checksum of 29 is correct because of some basic laws about xor and 
29 = 01 XOR 08 XOR 20      (all in hex)

If this is unclear see the examples in section V.

-----
IV.     The Sun 3/80

Here's a way to modify NVRAM IDPROM info on a Sun 3/80 (people have
to do this because of the usual battery problem, as with the sun4c
machines)

This may not be the most elegant procedure, but this should allow you
to modify the NVRAM IDPROM info on a sun 3/80. At first glance you
might think that the q command would work, but it doesn't seem to
actually modify anything when given addresses >= 0x7d8

Hit L1-A after you turn it on

N.B.: ^t is a command. Don't try control-T. 

Only tested with 2.9.2 PROMS.

> ^t fef04000
you'll get output which includes the following (samples included)
TIA entry = 33FA500
TIB entry = 33FB80A
PTE = 64000049

Write these values down!!

now change the TIA entry for fedfa000 to match the above

> m a fedfa000
TIA MAP FEDFA000 [...] ? 33FA500
   hit control-D at next ? prompt

now change the TIB entry to match the above

> m b fedfa000
TIB MAP FEDFA000 [...] ? 33FB80A

now change the pagemap entry to match the above
> p fedfa000
PageMap FEDFA000 [...] ? 64000049

> o fedfa7d8
...

now enter new IDPROM values. You need to get the checksum right.

byte          contents
fedfa7d8      01    - 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
fedfa7e5      third byte of hostid
fedfa7e6      fourth byte of hostid
fedfa7e7      IDPROM checksum  - xor of contents of bytes d8-e6


Note if you have SUN OS 4.1.1 booted (i.e. you're doing this for some other
reason than an IDPROM with invalid data), you can just write values into
fedfa7d8 ... fedfa7e7 with the o command. You don't need to do all the
mapping stuff.

If you are installing a virgin M48T02 chip, you'll also need to initialise
the other values in NVRAM, e.g. boot device, memory, etc. Unlike the
sun4c machines, the Sun 3/80 does not set these parameters to sane
defaults when it detects a virgin M48T02. To modify the rest of NVRAM 
you can use the "q" command in the monitor.

The following table of memory locations in NVRAM for the Sun 3 series
machines is from the Sun Hardware Reference 
by James W. Birdsall <jwbirdsa@picarefy.com>

I provide it here so you won't have to dig up the Sun Hardware Reference
to restore a 3/80 to working order.


        SUN 3 EEPROM/NVRAM Parameters

        0x14    Installed memory
          Megabytes of memory installed

        0x15    Tested memory
          Megabytes of memory tested during power-on self test (POST)

        0x16    Monitor screen size
          0x00   1152 x 900 (standard resolution)
          0x12   1024 x 1024 (1Kx1K)
          0x13   1600 x 1280 (high resolution, see locations 0x50 and 0x51)
          0x14   1440 x 1440
          0x15   1024 x 768 (low resolution)

        0x17    Watchdog reset action
          0x00   invoke ROM monitor
          0x12   imitate power-on reset (default)

        0x18    Operating system boot device
          0x00   poll (default)
          0x12   boot from EEPROM/NVRAM specified boot device

        0x19-0x1A  SunOS boot device name (in ASCII)
          0x78 0x79 (xy)  Xylogics 450/451 SMD controller
          0x78 0x64 (xd)  Xylogics 7053 SMD controller
          0x73 0x64 (sd)  SCSI disk
          0x69 0x65 (ie)  Ethernet (Intel-based controller)
          0x69 0x64 (id)  IPI disk
          0x67 0x6E (gn)  ???
          0x6C 0x65 (le)  Ethernet (Lance-based controller)

        0x1B-0x1D  SunOS boot device controller, unit, partition numbers
          0x00 0x00 0x00 (0,0,0) (default)

        0x1F    Primary terminal
          0x00   monochrome framebuffer
          0x10   serial port A
          0x11   serial port B
          0x12   VMEbus and 3/60-P4 color frame buffers (configure
                  locations 0x60C-0x613 when VX and MVX graphics options
                  are installed)
          0x20   non-3/60 P4 color frame buffer

        0x20    Power-up banner
          0x00   Sun logo display
          0x12   custom banner stored in 0x68-0xB7

        0x21    Keyboard click
          0x00   OFF
          0x12   ON (default)

        0x22-0x23  Diagnostic boot device name (in ASCII)
          Used when NORM/DIAG switch in DIAG position. As 0x19-0x1A, or
          0x00 0x00 to invoke ROM monitor.

        0x24-0x26  Diagnotic boot device controller, unit, partition numbers
          Used when NORM/DIAG switch in DIAG position. As 0x1B-0x1D.

        0x28-0x4F  Diagnostic boot path
          Used when NORM/DIAG switch in DIAG position. ASCII codes for
           path and filename(?) to boot, or all zeroes to invoke ROM
           monitor.

        0x50    High resolution number of columns

        0x51    High resolution number of rows

        0x58    Serial port A default baud rate
          0x00   9600 baud
          0x12   use rate stored at 0x59-0x5A

        0x59-0x5A  Serial port A baud rate
          The baud rate as a 16-bit number, MSB first (e.g. 0x04 0xB0
           for 1200, 0x12 0xC0 for 4800, 0x25 0x80 for 9600).

        0x5B    Serial port A DTR/RTS
          0x00   assert DTR and RTS signals
          0x12   do not assert DTR and RTS signals

        0x60    Serial port B default baud rate
          0x00   9600 baud
          0x12   use rate stored at 0x61-0x62
           Note that when the NORM/DIAG switch is in the DIAG position,
           port B runs at 1200 baud and the settings of locations
           0x60-0x62 are ignored.

        0x61-0x62  Serial port B baud rate
          The baud rate as a 16-bit number, MSB first (e.g. 0x04 0xB0
           for 1200, 0x12 0xC0 for 4800, 0x25 0x80 for 9600).

        0x63    Serial port B DTR/RTS
          0x00   assert DTR and RTS signals
          0x12   do not assert DTR and RTS signals

        0x68-0xB7  Custom banner
          ASCII codes for desired banner, padded with spaces and ending
           with 0x0D, 0x0A in locations 0xB6 and 0xB7

        0x111   Sun386i CPU revision level
          0x01   P1.5 CPU (should not be in the field)
          0x02   501-1241/1324-xx
          0x03   501-1413/1414-xx

        0x112   Sun386i CPU revision level
          0x00   P1.5 CPU (should not be in the field)  ([0x111] = 0x01)
          0x00   <= 501-1241-02 Rev 15                  ([0x111] = 0x02)
                 <= 501-1324-02 Rev 15
          0x02   >= 501-1241-02 Rev 16                  ([0x111] = 0x02)
                 >= 501-1324-02 Rev 16
          0x00   501-1413/1414-xx                       ([0x111] = 0x03)

        0x154   Sun386i SCSI spin-up delay (boot ROM >= 4.5 only)
          0x00   no delay (default)
          0xnn   delay nn seconds

        0x162   Sun386i password mode select (boot ROM >= 4.5 only)
          0x01   command secure mode
          0x5E   fully secure mode
          other  non-secure mode

        0x163-0x16A  Sun386i password
          Eight bytes of password in ASCII.

        0x18F   Logo type
          0x00   normal Sun logo
          0x06   3D logo for cgsix framebuffers
          0x12   custom logo

        0x492   Sun386i power-on mode
          0x02   bypass mode
          0x06   diagnostic boot
          0x07   normal boot

                Sun-3 and Sun-4 password mode select (boot ROM >= 2.7.1 only)
          0x01   command secure mode
          0x5E   fully secure mode
          other  non-secure mode

        0x493-0x49A  Sun-3 and Sun-4 password (boot ROM >= 2.7.1 only)
          Eight bytes of password in ASCII. If the ROM is 2.8, enter a
          '@' character before each letter of the password. Enter one
          letter per location, followed by <Return>. If the password is
          less than eight letters, enter 0x00 in the remaining
          locations. The hexadecimal values of the letters can also be
          used to enter the password.

        0x494   Sun386i autoconfig message flag
          0x00   no messages
          0x01   Sun-3 (UNIX expert type messages)
          0x02   verbose messages

        0x60C-0x60F  VX and MVX options boot code
          0x31 0x40 0x00 0x00   use the VX/MVX as the system console

        0x610-0x61e  VX and MVX options bus type
          0xFC 0x00 0x00 0x00   use the VX/MVX as the system console

        0x70B   3/80 power-on mode (boot ROM >= 2.3 only)
          0x06   normal boot
          0x12   diagnostic mode
          other full diagnostic boot

-----
V.      Examples

N.B. AS I'VE SAID ABOVE, YOU SHOULD BE CAREFUL THAT THE FIRST BYTE OF THE 
     HOSTID MATCHES YOUR SYSTEM TYPE.

1. modify the hostid of an IPX to be 57c0ffee and the ethernet address
   to be 08:00:20:c0:ff:ee

   at the forth monitor prompt

   02000000 obio 0 map-page
   01 7d8 c!
   57 7d9 c!
   08 7da c!
   0 7db c!
   20 7dc c!
   c0 7dd c!
   ff 7de c!
   ee 7df c!
   57 7e0 c!
   0 7e1 c!
   0 7e2 c!
   0 7e3 c!
   c0 7e4 c!
   ff 7e5 c!
   ee 7e6 c!
   29 7e7 c!

   
2. modify the hostid of an SS10 to be 72c0ffee and the ethernet address
   to be 08:00:20:c0:ff:ee

   at the forth monitor prompt

   f1201000 f 0 map-page
   01 fd8 c!
   72 fd9 c!
   08 fda c!
   0 fdb c!
   20 fdc c!
   c0 fdd c!
   ff fde c!
   ee fdf c!
   72 fe0 c!
   0 fe1 c!
   0 fe2 c!
   0 fe3 c!
   c0 fe4 c!
   ff fe5 c!
   ee fe6 c!
   29 fe7 c!

3. modify the hostid of an SS1000 to be 80c0ffee and the ethernet address
   of 08:00:20:c0:ff:ee

   at the forth monitor prompt

   00281000 f 0 map-page
   01 fd8 c!
   80 fd9 c!
   08 fda c!
   0 fdb c!
   20 fdc c!
   c0 fdd c!
   ff fde c!
   ee fdf c!
   80 fe0 c!
   0 fe1 c!
   0 fe2 c!
   0 fe3 c!
   c0 fe4 c!
   ff fe5 c!
   ee fe6 c!
   29 fe7 c!
   update-system-idprom

4. Install a virgin NVRAM in an IPX. Set the hostid to 57c0ffee and the
   ethernet address to be 08:00:20:c0:ff:ee

   Remove the old NVRAM
   Install the new NVRAM (correct orientation!)

   at the forth monitor prompt

   set-defaults
   02000000 obio 0 map-page
   setenv diag-switch? false
   01 7d8 c!
   57 7d9 c!
   08 7da c!
   0 7db c!
   20 7dc c!
   c0 7dd c!
   ff 7de c!
   ee 7df c!
   57 7e0 c!
   0 7e1 c!
   0 7e2 c!
   0 7e3 c!
   c0 7e4 c!
   ff 7e5 c!
   ee 7e6 c!
   29 7e7 c!


-----

VI.     Odds and Ends


Resetting the NVRAM (when L1-N doesn't do it)

You might want to do this to recover from the loss of an NVRAM password
(in full security mode) or if you mess up your nvramrc. My take on this
situtation is that the safest thing to do is pay the $20 for a new
Timekeeper chip. But several people have reported to me that it is safe
to hot-swap the NVRAM when the system is on.

dowdy@cs.colorado.edu (Stephen Dowdy) writes:
> (this may apply to other SPARC models.)
> IPC --  remove NVRAM, power-up without.  *carefully* hot-plug it in when OK
>     prompt comes up (after it says CHECKSUM failure).  do:
>         OK set-defaults
>         OK set-defaults
>     then power-cycle
> 
> SS2 --  you need to boot from a good NVRAM, then hot-swap the "bad" one
>     and "set-defaults".  Only if the L1-N (or is it L1-D) thingy
>     doesn't work for you.

---
Here is another way to determine the physical address of the NVRAM.

1. Use show-devs to find the name of the eeprom device
e.g.
    ok show-devs
    ...
    /obio/eeprom@0,200000
    ...

2. use the cd command to select that device. Then execute .attributes.
   .attributes will give the virtual address of the NVRAM (and some other
   information you can safely ignore)
e.g. 
    ok cd /obio/eeprom@0,200000
    ok .attributes
    address: ffee9000

3. use pgmap? together with the address from .attributes to determine
   the physical address
e.g.   
    ok ffee9000 pgmap?
    Page: ...
    Physical: 0.7120.0000

4. at the ok prompt execute the following two commands
   device-end
   reset
   
