Subject: System freeze after setting time on IIsi
To: macbsd macbsd <macbsd-general@NetBSD.Org>
From: Michael Smith <>
List: macbsd-general
Date: 09/25/1994 21:13:01
Ok, two (at least) problems here :

I'm using the netbsd-073094 kernel out of the for_testing/ directory.

Bootstrap gets the time Thu Dec 31 16:05:50 PST 1903 from my IIsi, which 
is not very useful 8)  (system time is set correctly).

I can reset the time/date with 'date', however I get the messages

<date> myname syslog: date set by root
we read ret=ff, tmp=ff (tmp+1) &0xff= 0
WARNING: cannot set battery-backed clock

The date is set (in the kernel) ok - date now returns sensible information.
Unfortunately, after about 5 seconds, the system locks up.
I'm using a serial terminal because the ADB in this kernel doesn't do IIsi
ADB (fair enough, it looks like a right pain) so all I can say for sure is
that the serial port is unhappy, however I left the system for several
minutes (to allow time for periodic sync) but still got filesystem errors
on restart.

looking at mac68k/mac68k/pram.c (file dated dec 17 1993), pram_settime
I find an interesting technique that I assume checks to see that some
change is being made (or there is some other wizardry to do with the
pram that I know not of).  This appears to be where the problem is
being picked up, (the ret= blah above is here), and as pram_gettime 
does no sanity checking I can assume that there is a problem with the pram
interface code.

Anyone else with a IIsi and working time/date?  Anyone have a fix, or does
the source I have have the fix in it?
(turns out to be a major problem after a kernel build dies halfway through
(this is another problem actually, where is mac68k/dev/bounds.h ???)
and I restart it - all of the sources are decades newer than the objects
that have just been built from them... full compile on a 5M IIsi is slow!)

Should keep you thinking!

# mike smith : - Silicon grease monkey        #
# "The question 'why are the fundamental laws of nature mathematical'  #
# then invites the trivial response 'because we define as fundamental  #
# those laws which are mathematical'". Paul Davies, _The_Mind_of_God_. #