Re: Patch: Generic TODR for ARM ports
Garrett D'Amore <[email protected]> Sun, 17 Sep 2006 09:33:20 -0700
| Newsgroups | gmane.os.netbsd.ports.hpcarm |
|---|---|
| Message-ID | <[email protected]> |
Garrett D'Amore wrote: > Valeriy E. Ushakov wrote: > >> On Sun, Sep 17, 2006 at 16:46:32 +0200, Peter Postma wrote: >> >> >> >>> I can add an RTC driver, but I'm not sure how useful that would be, >>> the RTC value is invalid at boot-time >>> >>> >> hpcboot passes current time to the kernel as part of bootinfo. It >> will be off by several seconds by the time the kernel starts, but >> that's still better than fs time. >> >> BTW, why is RTC time invalid? >> >> SY, Uwe >> >> > > If you read the messages, you will find out that the problem is that no > RTC driver is registered with the MI todr code. It is likely that this > could be solved by adding an RTC driver which just uses the boot-info time. > > Alternatively, for a port which gets the time passed in bootinfo, I can > see a case being made for #ifdef'ing out the warning messages in > kern_todr.c. Please not that this case is very different from assuming > an NFS root mount is current -- one is probably a good assumption, while > the other might not be. > > Actually, if we have the bootinfo written to the RTC by machdep code, then a driver could pick it up using the "normal" NetBSD way of things, and this would be best. I.e. we need to bits of code: 1) an RTC driver, 2) code in mach_init or somesuch to "prime" the RTC from bootinfo. -- Garrett D'Amore, Principal Software Engineer Tadpole Computer / Computing Technologies Division, General Dynamics C4 Systems http://www.tadpolecomputer.com/ Phone: 951 325-2134 Fax: 951 325-2191