I'm puttering about in libpayload doing silly things with the real time clock, and it occurred to me to figure out if coreboot knows how to set the clock to a sane value if CMOS had been cleared or something similar.
I looked in v2 at pc80/mc146818rtc.c, and the code that writes to the clock appears to be #if 0ed out. I couldn't find any where else where the clock would be set. The same thing is disabled on v3. According to svn blame, it has been like that ever since ebiderm checked in v2.
is there an interesting story as to why this is disabled? IMHO, we should be setting the clock to a sane value if it is determined to be bad, especially since we'll probably have some payloads soon that will care what time it is. Not so much that they need to be accurate down to the microsecond, but more that I want to be sure that if I read the clock, its not bogus.
Jordan
On Wed, Apr 16, 2008 at 12:55 PM, Jordan Crouse jordan.crouse@amd.com wrote:
is there an interesting story as to why this is disabled?
I doubt we ever got around to looking at it ... :-)
ron
On Wed, Apr 16, 2008 at 01:55:33PM -0600, Jordan Crouse wrote:
IMHO, we should be setting the clock to a sane value if it is determined to be bad,
How would we determine that?
//Peter
Peter Stuge wrote:
On Wed, Apr 16, 2008 at 01:55:33PM -0600, Jordan Crouse wrote:
IMHO, we should be setting the clock to a sane value if it is determined to be bad,
How would we determine that?
//Peter
The diagnostics status byte 0x0e would be the place. Marc
On Fri, 2008-04-18 at 16:37 +0200, Peter Stuge wrote:
On Wed, Apr 16, 2008 at 01:55:33PM -0600, Jordan Crouse wrote:
IMHO, we should be setting the clock to a sane value if it is determined to be bad,
How would we determine that?
Would that defeat the ability of other code to determine the clock was *not* set? If time < 1900 then clock_set = false.