Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Apr 2000 13:30:27 -0400
From:      Alan Clegg <abc@firehouse.net>
To:        freebsd-current@freebsd.org
Subject:   Patch to allow TSC with APM
Message-ID:  <20000418133027.D21818@ecto.greenpeas.org>

next in thread | raw e-mail | index | archive | help
I'd like to recommend the following patches.  Adding the option
"CLK_USE_TSC_ANYWAY" allows my laptop to use the TSC even though it
is "flakey".  This option should not be set by default.

/usr/src/sys/i386/isa:
*** clock.c.ORIG        Tue Apr 18 09:45:52 2000
--- clock.c     Tue Apr 18 10:21:49 2000
***************
*** 816,822 ****
--- 816,832 ----
         * We don't know at this point whether APM is going to be used
         * or not, nor when it might be activated.  Play it safe.
         */
+ #ifdef CLK_USE_TSC_ANYWAY
+       /*
+        * Some laptops lose so much time without the TSC that even if
+        * it is not "good", it is better than nothing.  This allows
+        * a WinBook XL2 with no APM control to keep clock.  Wihout
+        * this option, it loses over six seconds per minute.
+        */
+       printf("Using TSC with APM\n");
+ #else
        return;
+ #endif /* CLK_USE_TSC_ANYWAY */
  #endif /* NAPM > 0 */
  
        if (tsc_present && tsc_freq != 0 && !tsc_is_broken) {


/usr/src/sys/conf:
*** options.i386.orig   Tue Apr 18 09:44:40 2000
--- options.i386        Tue Apr 18 10:22:38 2000
***************
*** 37,42 ****
--- 37,43 ----
  CLK_CALIBRATION_LOOP          opt_clock.h
  CLK_USE_I8254_CALIBRATION     opt_clock.h
  CLK_USE_TSC_CALIBRATION               opt_clock.h
+ CLK_USE_TSC_ANYWAY            opt_clock.h
  TIMER_FREQ                    opt_clock.h
  
  NO_F00F_HACK                  opt_cpu.h


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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