Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Dec 1999 07:30:32 -0800 (PST)
From:      Bruce Evans <bde@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/i386/isa clock.c
Message-ID:  <199912251530.HAA04728@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912251530.HAA04728>