Path: utzoo!mnetor!uunet!husc6!uwvax!rutgers!columbia!westend!dupuy From: dupuy@westend.columbia.edu (Alexander Dupuy) Newsgroups: comp.unix.wizards Subject: Re: WARNING: TOD clock not initialized -- CHECK AND RESET THE DATE! Message-ID: <5207@columbia.edu> Date: 5 Jan 88 12:36:48 GMT References: <11093@brl-adm.ARPA> Sender: nobody@columbia.edu Reply-To: dupuy@westend.columbia.edu (Alexander Dupuy) Followup-To: comp.unix.wizards Organization: Columbia University Computer Science Dept. Lines: 59 Just so that everyone installs the best patch for this problem - Robert Elz posted a better binary patch than Stuart Levy's in that Elz's will also work in non-leap years (like 1989, justin case you're still running 3.4 then...) From: kre@munnari.oz (Robert Elz) Newsgroups: comp.protocols.tcp-ip Summary: An alternative binary patch (for SunOS 3.4), which will work forever Message-ID: <1944@munnari.oz> Date: 3 Jan 88 08:25:17 GMT Here's an alternative (binary) patch that will work in both leap years, and in boring old ordinary years. # adb -w -k /vmunix /dev/mem resettodr+0xca?X (It should contain 0x536efff4, a subqw #1,a6@(-0xc) instruction. If you applied Stuart's patch it will contain 0x4e714e71, 2 nop's so put back the subw in both the kernel a.out, and memory) .?W 536efff4 ./W 536efff4 (next, apply a slightly better fix) resettodr+0xc0?i (it should contain "bnes resettodr+0xca", which we will change to be "bnes resettodr+0xce" and avoid the incorrect subw) .?w 660c (now verify that its correct) .?i (and assuming it is "bnes resettodr+0xca", change the running kernel) ./w 660c $q I can't verify that this actually fixes the reported problem, but it clearly does fix a bug, and should have the same effect this year as Stuart's fix, while not hurting next year. I used SunOS 3.4 to do this, in case other versions of SunOS deviate (3.3 is apparently the same), here is the original section of binary ... _resettodr+0xa6: movw a6@(-0x10),d0 _resettodr+0xaa: moveq #3,d1 _resettodr+0xac: andw d1,d0 _resettodr+0xae: andl #0xffff,d0 _resettodr+0xb4: bnes _resettodr+0xca _resettodr+0xb6: subqw #1,a6@(-0xc) _resettodr+0xba: cmpw #2,a6@(-0xc) _resettodr+0xc0: bnes _resettodr+0xca <<<< change this to _resettodr+0xc2: movl #0x263b80,d0 _resettodr+0xc8: bras _resettodr+0xde _resettodr+0xca: subqw #1,a6@(-0xc) _resettodr+0xce: moveq #0,d0 <<<< branch to here _resettodr+0xd0: movw a6@(-0xc),d0 _resettodr+0xd4: lea _monthsec:l,a0 _resettodr+0xda: movl a0@(-4,d0:l:4),d0 _resettodr+0xde: addl d0,d7 kre --- arpanet: dupuy@columbia.edu uucp: ...!seismo!columbia!dupuy