From owner-cvs-all Sat Dec 25 7:30:35 1999 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id BC0AE14FAF; Sat, 25 Dec 1999 07:30:32 -0800 (PST) (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id HAA04728; Sat, 25 Dec 1999 07:30:32 -0800 (PST) (envelope-from bde@FreeBSD.org) Message-Id: <199912251530.HAA04728@freefall.freebsd.org> From: Bruce Evans Date: Sat, 25 Dec 1999 07:30:32 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/i386/isa clock.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk bde 1999/12/25 07:30:32 PST Modified files: sys/i386/isa clock.c Log: Fixed races accessing the RTC. The races apparently caused apm_default_resume() to sometimes set a very wrong time. (1) Accesses to the RTC index and data registers were not atomic enough. Interrupts were not masked. This was only good enough until an interrupt handler (rtcintr()) started accessing the RTC in FreeBSD-2.0. (2) Access to the block of time registers in inittodr() was not atomic enough. inittodr() has 244us to read the time registers. Interrupts were not masked. This was only good enough until something (apm) started calling inittodr() after boot time in FreeBSD-2.0. The fix for (2) also makes the timecounter update more atomic, although this is currently unimportant due to the low resolution of the RTC. Problem reported by: mckay Revision Changes Path 1.148 +17 -5 src/sys/i386/isa/clock.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message