Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jan 2000 23:40:34 -0800 (PST)
From:      Matthew Jacob <mjacob@feral.com>
To:        Peter Wemm <peter@netplex.com.au>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/dec mcclock.c 
Message-ID:  <Pine.BSF.4.10.10001032331150.3607-100000@beppo.feral.com>
In-Reply-To: <20000104071255.D2B501CC6@overcee.netplex.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
> Matthew Jacob wrote:
> > 
> > The reason I didn't do it this way is that there are cases where OSF/1 and
> > ARC usages of the TOY chip leave it with a date readable with what you
> > have below, but completely wrong. I always can tell when I've been running
> > NT because the date is 2021. That's why I specifically selected a 10 year
> > window.
> 
> Err what?  If you boot NT, it sets the year to "21" instead of "00"?  If so,
> that's bizzare.. :-/

However the stuff is stored/used, it definitely gets interpreted 
differently. There's various interpretations of how cmos is stored- and
things can get fouled up for sure. 

> 
> > If you think there's something else going on, let me know. 
> 
> No, I was just pointing out that on the i386 family (which have a RTC which
> is derived from this device), we completely ignore the century byte which
> is in cmos ram, not an actual register.  If the year value is < 70, we use
> 2000-2069 but if it's >= 70 then we use 1970 - 1999.  Aside from leap year
> issues, FreeBSD/i386 is y2k compliant on hardware that doesn't roll over
> properly (providing the bios doesn't reset "00" to "80" like some do).

The TOY chip rolls over just fine. The +70 bias that U*ix uses just has to
be informed somehow. The i386 has decided to do this explicitly in the
main clock routines. I elected to add a +100/-100 carry/subtract in the
chip specific code.

The inittodr routine for i386 is in an intrinsically MD code module
(isa/clock.c). The bias that I'm adding is also in an MD code module
(dev/dev/mcclock.c), but the inittodr routine for alpha is in a more MI
module of alpha/alpha/clock.c. Personally, I think this makes more sense-
the code there doesn't have to change because the year count is still
from 70 onwards in that anything between 0 && 10 will be biased up by 100-
and if any of these machines are still running in 2010, I'll fix the
problem again.

I'm still trying to figure out what you're objecting to, if anything. Is
it because it's different from the i386?

-matt



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10001032331150.3607-100000>