summaryrefslogtreecommitdiffstats
path: root/sys/i386/apm
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>1999-10-30 14:56:01 +0000
committeriwasaki <iwasaki@FreeBSD.org>1999-10-30 14:56:01 +0000
commit945a25b48913c2f1a8b8f0aadcb902c3189ed927 (patch)
tree44779f7a28dcd79760060b54d492be07d1a097e2 /sys/i386/apm
parent437d3feb752ab5ec3128771f54f8a684bf186e02 (diff)
downloadFreeBSD-src-945a25b48913c2f1a8b8f0aadcb902c3189ed927.zip
FreeBSD-src-945a25b48913c2f1a8b8f0aadcb902c3189ed927.tar.gz
i8254_restore is called from apm_default_resume() to reload
the countdown register. this should not be necessary but there are broken laptops that do not restore the countdown register on resume. when it happnes, it messes up the hardclock interval and system clock, which leads to the infamous "calcru: negative time" problem. Submitted by: kjc, iwasaki Reviewed by: Steve O'Hara-Smith <steveo@eircom.net> and committers. Obtained from: PAO3
Diffstat (limited to 'sys/i386/apm')
-rw-r--r--sys/i386/apm/apm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c
index 96860f6..9630f02 100644
--- a/sys/i386/apm/apm.c
+++ b/sys/i386/apm/apm.c
@@ -404,6 +404,7 @@ apm_default_resume(void *arg)
/* modified for adjkerntz */
pl = splsoftclock();
+ i8254_restore(); /* restore timer_freq and hz */
inittodr(0); /* adjust time to RTC */
microtime(&resume_time);
getmicrotime(&tmp_time);
OpenPOWER on IntegriCloud