Commit Graph

16 Commits

Author SHA1 Message Date
christos b59f66e17c use the inline bcdtobin and bintobcd directly instead through a macro. 2014-11-20 16:34:25 +00:00
msaitoh b269f9fa1f Clear memory as intended. Fixes PR#46372. 2013-07-25 04:21:47 +00:00
tsutsui 698e481cab Switch to using todr_[gs]ettime_ymdhms() format
which don't require struct timeval details.
Also fix a botch calling MI todr_settime(9) without rtc_offset adjustment.
2009-12-12 16:12:05 +00:00
tsutsui 471e528b58 Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
2009-12-12 14:44:08 +00:00
tsutsui 0b5468d9dc Don't refer garbage in stack.
- An argument of struct timeval *tv passed by todr_gettime(9) is used
  for a return value and it doesn't contain valid data. Don't read it.
- Instead, use getmicrotime(9) to get a "reasonable" (i.e. current) time
  to see expected year value (which is not kept by this device).
- If current time is not valid, assume this is the first todr_gettime(9)
  call from inittodr(9) and use file system time for the "reasonable" year.

Fixes silent hangup after mountroot() on sun2.

XXX: MI todr(9) functions seem to get mangled around year ~22000.
2009-12-11 11:07:04 +00:00
tsutsui bc6f8d1486 Split device_t/softc with misc cosmetic changes. 2008-07-06 13:29:50 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
gdamore a37acb1b52 Remove unused todr_setcal/todr_getcal and all the assorted stub
implementations.
2006-09-04 23:45:30 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
he aafdb08c5a Fix the various todr_gettime() and todr_settime() fallouts from
-Wcast-qual differently, by instead changing the signatore of those
"functions" to take a "volatile struct timeval*" instead of a
"struct timeval*".  Many places, these functions are called with
&time, and time is declared as volatile in <sys/kernel.h>.  This
way we can get rid of all the ugly casts which now also triggered
warnings, and caused more code to be added to work around the
problem.

Reviewed by thorpej.
2005-06-04 20:14:24 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
perry 18db93c7f6 de-__P 2005-02-04 02:10:35 +00:00
lukem a4bae8b066 add/cleanup RCSID 2001-11-13 13:14:31 +00:00
thorpej 0884f20bf7 bzero -> memset 2001-07-07 16:13:44 +00:00
fredette b27eda4ead Added. 2001-04-10 12:46:26 +00:00