Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Aug 1999 01:21:35 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, peter@netplex.com.au
Cc:        frank@tinker.exit.com, jim@thehousleys.net, smp@FreeBSD.ORG, stalker@feerbsd.org
Subject:   Re: ASUS P2B-DS versus SMP.
Message-ID:  <199908041521.BAA09170@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> >you've got a really old system that doesn't have a century byte at all.  (I
>> >think the PC and PC/XT were the main class of machines that didn't have
>> >this, the AT and beyond all had it as far as I know.  Some older clones may
>> >be missing it).
>> 
>> All systems with an RTC have the RAM where the century byte is.  The issue
>> is whether the BIOS supports it, and whether year 00 is handled as a
>> leap year.
>
>Well, 00 (century prefix 20) is a leap year, the next three 00's are not
>leap years.

I checked what a 4 year old RTC does.  It treats years 1900, 2000 and 2100
as leap years.  I guess the CMOS byte is just RAM and doesn't affect leap
year handling, and the hardware uses the simple rule `(year % 4) == 0' to
determine leap years.

>I wonder though, should we always write the century back, regardless of the
>USE_RTC_CENTURY option?

This would break any systems that use the century byte for something else.
I don't know of any supported ones.  The Interrupt List (1995 version)
says that the byte is the low byte if the Configuration CRC for PS2's.

>If that's not safe (ie: maybe the bios uses century offset by 19, ie: 00
>century = 1900, 01 = 2000, etc), then perhaps read the century at startup and
>change (ie: increment) it at rollover.  So, 00 will change to 01, or 19 will
>change to 20, whatever.

19 might be part of a CRC :-).

Bruce


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908041521.BAA09170>