Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KEs3c-0001j0-3L for mharc-grub-devel@gnu.org; Fri, 04 Jul 2008 16:39:04 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KEs3a-0001f3-AL for grub-devel@gnu.org; Fri, 04 Jul 2008 16:39:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KEs3Z-0001e4-M9 for grub-devel@gnu.org; Fri, 04 Jul 2008 16:39:02 -0400 Received: from [199.232.76.173] (port=53153 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KEs3Z-0001dq-Hn for grub-devel@gnu.org; Fri, 04 Jul 2008 16:39:01 -0400 Received: from gateway04.websitewelcome.com ([69.56.195.7]:51930) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KEs3Z-0000V0-Fm for grub-devel@gnu.org; Fri, 04 Jul 2008 16:39:01 -0400 Received: (qmail 11218 invoked from network); 4 Jul 2008 20:44:51 -0000 Received: from gator297.hostgator.com (74.53.228.114) by gateway04.websitewelcome.com with SMTP; 4 Jul 2008 20:44:51 -0000 Received: from c-67-185-142-228.hsd1.wa.comcast.net ([67.185.142.228]:52507 helo=localhost) by gator297.hostgator.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1KEs3V-00078E-P7; Fri, 04 Jul 2008 15:38:57 -0500 Date: Fri, 4 Jul 2008 13:38:29 -0700 From: Colin D Bennett To: The development of GRUB 2 Message-ID: <20080704133829.11b5a75d@gibibit.com> In-Reply-To: <486E7EE7.6080509@nic.fi> References: <20080623075438.5861e6d1@gibibit.com> <878wwi6bqy.fsf@xs4all.nl> <20080704112801.470827ea@gibibit.com> <486E7EE7.6080509@nic.fi> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/6TgkPYdrcSi_6E05VtkWcom"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator297.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gibibit.com X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Cc: Subject: Re: [RFC] TSC patch v2 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2008 20:39:02 -0000 --Sig_/6TgkPYdrcSi_6E05VtkWcom Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 04 Jul 2008 22:49:59 +0300 Vesa J=C3=A4=C3=A4skel=C3=A4inen wrote: > Hi Colin, >=20 > Colin D Bennett wrote: > > Here is an updated version of the TSC patch. > >=20 > > I addressed the issues in your comments with the exception of > > supporting x86 CPUs that don't have a TSC (386 and 486). > >=20 > > I eliminated the grub_time_init() function and the call to it in > > grub_main() in favor of having grub_machine_init() simply call > > grub_tsc_calibrate(). The i386-pc and i386-efi platforms use the > > TSC. >=20 > Please still use grub_time_init(). Detect TSC, if it is there > calibrate and adapt for it. If it is not there, use RTC. Should grub_time_init() be a CPU or machine independent function? Should it use conditional compilation to be usable on different CPUs? Or should grub_time_init() be specific to i386 kernels at this point? (Since we don't have anything to initialize for non-TSC-supporting platforms.) If grub_time_init() is specific to the i386 CPU, then grub_time_init() should check whether the CPU has TSC support, and if so, grub_tsc_calibrate() should be called, and calls to grub_get_time_ms() should be directed to the TSC implementation. If no TSC support is available, then no calibration is done, and calls to grub_get_time_ms() should be directed to the generic get_time_ms() implementation that uses grub_get_rtc() to do its job. I want to make sure that I clearly understand what you want, since I have made major re-designs of the TSC support in GRUB in an attempt to do what you want. Just in the past couple of days I have spent about 8 hours getting the TSC patch where it is now. (I know that seems like a lot since it's not that much code, but I am just beginning to get familiar with the GRUB kernel organization, so simple changes have been taking me a long time.) > grub_time_init() is just more clearer term than tsc. At least for > people that are not familiar with it. in grub_time_init() you can > have anything then. And people that are not interested on time stuff > do not need to bother their heads about it. Also modifying logic > afterwards do not change other parts and it will be less error prone. OK. Regards, Colin --Sig_/6TgkPYdrcSi_6E05VtkWcom Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkhuikcACgkQokx8fzcGbYdwfwCfamQsIJCmEzjPDO5K9a/RxPR5 LrgAnAp17Hk4rZfqAA8MMimEaVMcZIbe =ptSR -----END PGP SIGNATURE----- --Sig_/6TgkPYdrcSi_6E05VtkWcom--