From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JwJok-0004ql-7U for mharc-grub-devel@gnu.org; Wed, 14 May 2008 12:27:02 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JwJoh-0004q2-Qa for grub-devel@gnu.org; Wed, 14 May 2008 12:26:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JwJof-0004pQ-JF for grub-devel@gnu.org; Wed, 14 May 2008 12:26:58 -0400 Received: from [199.232.76.173] (port=60959 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JwJof-0004pA-5v for grub-devel@gnu.org; Wed, 14 May 2008 12:26:57 -0400 Received: from mta-out.inet.fi ([195.156.147.13]:54832 helo=kirsi1.rokki.sonera.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JwJoe-00005j-NN for grub-devel@gnu.org; Wed, 14 May 2008 12:26:57 -0400 Received: from [127.0.0.1] (88.193.32.97) by kirsi1.rokki.sonera.fi (8.5.014) id 48232FF0004E92B0 for grub-devel@gnu.org; Wed, 14 May 2008 19:26:52 +0300 Message-ID: <482B12CE.6020607@nic.fi> Date: Wed, 14 May 2008 19:26:54 +0300 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: The development of GRUB 2 References: <20080512093354.2770e1cf@gibibit.com> In-Reply-To: <20080512093354.2770e1cf@gibibit.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: Quoted-Printable X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: Higher resolution timers 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: Wed, 14 May 2008 16:26:59 -0000 Hi All, Colin D Bennett wrote: > To implement a nice GUI with some animations, it will be important to > have a timer with a better resolution than 1/18 second (which appears > to be the current GRUB timer resolution on the PC). >=20 > What would be the best way to do this? Possibilities that I am aware of > are:=20 > * RDTSC instruction (must calibrate with RTC at startup?) > * HPET (complex to use?) > * RTC (can we set the timer interrupt rate to >18 Hz?) >=20 > Does anyone have any thoughts on these options? >=20 > I think that using the TSC (w/ RDTSC instruction) and calibrating it > with a quick 2-3 RTC tick loop at startup might be the easiest option. Perhaps non-x86 BIOS people could provide feedback how to get more=20 detailed timer information on other platforms? So we could produce an=20 API that would be portable. At least RDTSC do not work on pre-pentium machines so at least some=20 detection for this OP code would be required to determine best possible=20 way to use timer service. I think we have cpuid module already, perhaps=20 this could be used for that too... Thanks, Vesa J=E4=E4skel=E4inen