Subject: Re: SparcStation ipx versus Sparc Classic
To: None <port-sparc@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc
Date: 05/02/2002 02:52:07
>>> Sun NVRAM will eventually die.  [...] Long periods of storage seem
>>> to shorten battery life.
>> Well, long periods of being powered down will, unless you stop the
>> clock first.  [...]
>> Whenever I take a machine out of service, even if I expect it to be
>> for only a day or two, I'm always careful to stop the clock first.
> very interesting.  how does one stop & start the clock?

I got another off-list message asking the same thing.

You practically never need to start the clock.  The Sun POST code does
that automatically if it finds the clock isn't running.  If you really
want to do it yourself, taking the stop-the-clock instructions below
and reading the chip datasheets (pointers below) should teach you
enough.

To stop the clock, here are the commands I've used.  Machine names
outside brackets indicate that I've used the instructions on that sort
of machine and they've worked; inside brackets indicates I think they
should work but don't have personal experience indicating so.  The last
entry is obviously fragmentary. :-)

ss4 [classic, lx, ss5, voyager]
	71201000 0 0 map-page
	80 ff8 c!
	80 ff9 c!
	0 ff8 c!
ss1+ [ss1, ss2, elc, ipc, ipx, slc]
	02000000 obio 0 map-page
	80 7f8 c!
	80 7f9 c!
	0 7f8 c!
ss20 [ss10, 6x0/mp]
	f1201000 f 0 map-page
	80 ff8 c!
	80 ff9 c!
	0 ff8 c!
[ss1000]
	00280000 f

This is derived from http://www.squirrel.com/squirrel/sun-nvram-hostid.faq
(which contains some of the info but not as nicely collected), plus
some experimenting of my own.

If you want the datasheets on the chips, I found them at
http://eu.st.com/stonline/books/pdf/docs/2410.pdf and .../2411.pdf; if
those have gone 404 I'll be happy to supply copies.

If you have to experiment with offsets and such, one useful thing is to
check the seconds register _before_ trying to stop the clock; if it's
not ticking about once a second, you haven't found the right values.
For example, on the SS4,

	71201000 0 0 map-page
	ff9 c?
(pause)
	ff9 c?
(pause)
	ff9 c?

should print values differing by about as much as the time in seconds
that you pause.  (The values are in hex but look as though they're in
decimal, because the register is BCD rather than binary.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B