From owner-cvs-all Mon Jan 3 21:21:43 2000 Delivered-To: cvs-all@freebsd.org Received: from overcee.netplex.com.au (overcee.netplex.com.au [202.12.86.7]) by hub.freebsd.org (Postfix) with ESMTP id 4B6FD14FC8; Mon, 3 Jan 2000 21:21:37 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id C85E01CA0; Tue, 4 Jan 2000 13:21:33 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.1.1 10/15/1999 To: Matt Jacob Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/dec mcclock.c In-Reply-To: Message from Matt Jacob of "Mon, 03 Jan 2000 19:22:06 PST." <200001040322.TAA74392@freefall.freebsd.org> Date: Tue, 04 Jan 2000 13:21:33 +0800 From: Peter Wemm Message-Id: <20000104052133.C85E01CA0@overcee.netplex.com.au> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk Matt Jacob wrote: > mjacob 2000/01/03 19:22:06 PST > > Modified files: > sys/dev/dec mcclock.c > Log: > Ho, ho, ho... this clock chip is not y2k compliant. Motorola > has it blacklisted. Silly us for not planning ahead. Tsk. Anyway- > a 10 year window patch is probably sufficient to still detect > nonsense in the clock but allow us to roll past the year 2000. Umm, this is the same chip that the PC rtc is based on: #define MC_YEAR 0x9 /* Time of year: year in century (0-99) */ On the PC side of things we use an 70 year window. < 70 = 2000-2069 and >= 70 = 1970-1999. #ifdef USE_RTC_CENTURY year = readrtc(RTC_YEAR) + readrtc(RTC_CENTURY) * 100; #else year = readrtc(RTC_YEAR) + 1900; if (year < 1970) year += 100; #endif if (year < 1970) { splx(s); goto wrong_time; } The alpha equivalent of this code is in alpha/alpha/clock.c (inittodr), which doesn't look quite right... Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message