RE: i386/RTC: old problem, new solution?

BROWN Nick (Nick.BROWN@coe.int)
Fri, 21 May 1999 17:32:38 +0200


>I can't speak for other architectures, but the common RTC chip on
the
>ix86 architecture is the 148???? (I forget the rest of the number),
>and this has two flags of interest. The first is writable, and
tells
>the chip whether or not to implement DST, and the second is read
only
>and states whether the chip is currently returning DST or non-DST
>time.

In my wonderful book ("ISA System Architecture") by Shanley and Anderson, it
says:

- it's a Motorola MC146818, or (more often these days) a clone from Dallas
Semiconductor
- you can read and write bit 0 of byte 0Bh to set/clear the DST bit. So you
can use
outb(0x0b, 0x70)
dst = (inb(0x71) & 1)

There's also a BIOS call (INT 1Ah AH=2(read) 3(write)) which gets/sets the
date/time. You can get it, set the low bit of DL to 1, optionally subtract
an hour, and set it.

Unfortunately, on my Dell machine anyway, the DST bit gets reset to zero,
probably the BIOS, across a warm boot...

Nick Brown, Strasbourg, France (Nick(dot)Brown(at)coe(dot)int)

__________________________________________________________

email address updates : @coe.int replaces @coe.fr
for more information, http://dct.coe.int/info/emfci001.htm
__________________________________________________________

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/