linux-mips-fnet
[Top] [All Lists]

RE: DECstation rtc driver

To: Harald Koerfgen <Harald.Koerfgen@home.ivm.de>
Subject: RE: DECstation rtc driver
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Wed, 29 Mar 2000 08:27:24 +0200 (MET DST)
Cc: linux-mips@fnet.fr
In-reply-to: <XFMail.000328172240.Harald.Koerfgen@home.ivm.de>
Organization: Technical University of Gdansk
On Tue, 28 Mar 2000, Harald Koerfgen wrote:

> Sad, but true. The DECstation engineers, in their infinite wisdom, decided to
> use the RTC chip as a TOY (Time Of Year clock) and as such the BootPROM allows
> only the years 70..72 as valid values (70 for even years, 71 for odd years, 
> and
> 72 for leap years).

 Are you *absolutely* sure there are firmware revisions that accept 70, 71
and 72 as a year?  That would be terribly broken as for example the
firmware my machine uses only accepts 72 and 73.  The relevant part of the
code that is responsible for range checking looks like follows:

[...]
    bfc01f74:   a0bf103c        lui     $s0,0xbfa0
[...]
    bfc01fd0:   24000b92        lbu     $t3,36($s0)
    bfc01fd4:   48000124        li      $at,72
    bfc01fd8:   02006111        beq     $t3,$at,0xbfc01fe4
    bfc01fdc:   49000124        li      $at,73
    bfc01fe0:   19006115        bne     $t3,$at,0xbfc02048
[...]

so 72 and 73 are checked quite explicitly.  IIRC, the archives of the pmax
NetBSD mailing list only mention 72 and 73, too.

 If some machines handle a different range than others then handling of
the date automatically would only be possible if we could manage a list of
possible boxes somehow.  The line of DECstations is not that large, so it
should not be a problem per se, but in practice it could be quite
difficult as there seems to be no clean way of checking the firmware
revision.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

<Prev in Thread] Current Thread [Next in Thread>