Re: WARNING: TOD clock not initialized -- CHECK AND RESET THE DATE!


Stuart Levy (slevy@uc.msc.umn.edu)
Sat, 2 Jan 88 00:27:09 CST


Whew. I was pinging umd1.umd.edu at leap second time, hoping to catch it in
the act (wonder how many others were doing the same thing?), when suddenly
the time difference started hurtling into outer space. For a moment I
wondered if Dave Mills had added a leap minute instead of second, but no,
our SUNs had all gone mad. It was a great relief to hear that someone
else saw the same thing.

I believe I have a fix for this.. Probably the easiest way to
distribute it without annoying SUN too much is as a binary patch.
Say:

# adb -w -k /vmunix /dev/mem
resettodr+0xca?X
        (It should contain 0x536efff4, a subqw #1,a6@(-0xc) instruction.)
        (Change it to NOP's in the /vmunix file with...)
.?W 4e714e71
        (and in the running kernel (this seems to be safe) with...)
./W 4e714e71
$q
#

For those who have source, the relevant module is sun3/clock.c.
The line in resettodr() reading

        t += MONTHSEC(--mon, year);

breaks, since MONTHSEC evaluates the --mon twice in leap years.
It could change to

        mon--;
        t += MONTHSEC(mon, year);

This appears to work on our SUNs running 3.3.

                                Stuart Levy, Minn. Supercomputer Center
                                slevy@uc.msc.umn.edu



This archive was generated by hypermail 2.0b3 on Thu Mar 09 2000 - 14:40:40 GMT