[comp.unix.wizards] Sun4 Patch for Time of Day Clock problem

chuq@plaid.Sun.COM (Chuq Von Rospach) (01/06/88)

As of Jan 1 00:00 1988, the clock routine in the kernel will put the
clock chip into an uncertain state if you attempt to set the date.
The visible effects of this is to 1) cause the message
  
        WARNING: TOD clock not initialized -- CHECK AND RESET THE DATE!  
  
to appear while booting vmunix, and to 2) cause the system date to start
to drift widely. Any attempts to actually *set* the date will have only a
temporary effect (i.e., the date you set will be good for about 30 seconds).
  
In order to solve this problem, you must patch both the kernel and system
object files.

==============================================================================

        Sun4 (SPARC) System Patch - Tue Jan  5 17:17:28 PST 1988

                For SunOS Release Sys4-3.2 FCS
  
For DISKFULL and SERVER MACHINES ONLY:

As root, run the follwing command:

        echo 'resettodr+0x110?i' | adb /vmunix -

You should see the following printed out:

        _resettodr+0x110:       sub     %i5, 0x1, %i5

If you see instead:

        _resettodr+0x110:       sub     %i5, 0x0, %i5

the patch has already been applied to this system.
Proceed with the rest of the patch procedure anyway!

If you do not see either of these messages, go no further with this patch,
and please contact Sun Microsystems Customer Service.

If you do see either of those messages, then run, as root,
the following command:

        echo 'resettodr+0x110?W 0xba276000' | adb -w /vmunix

Reboot and then *set* the date.

If you build kernels for your system, or are a server for diskless clients,
do, as root

        cp /sys/sun4/OBJ/clock.o /sys/sun4/OBJ/clock.o- 
        echo 'resettodr+0x110?W 0xba276000' | adb -w /sys/sun4/OBJ/clock.o

and then rebuild your kernel and/or the kernels for your diskless clients.


FOR DISKLESS MACHINES:

Your System Administrator must build a new kernel for you that contains
the patch. Once this is done, you will reboot and set the date.

==============================================================================
-


Chuq "Fixed in 4.0" Von Rospach		chuq@sun.COM		Delphi: CHUQ

                       What do you mean 'You don't really want to hurt her?'
                                    I'm a Super-Villian! That's my Schtick!