From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KRBPz-0006hd-0O for mharc-grub-devel@gnu.org; Thu, 07 Aug 2008 15:45:03 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KRBPx-0006gl-5N for grub-devel@gnu.org; Thu, 07 Aug 2008 15:45:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KRBPv-0006fI-TL for grub-devel@gnu.org; Thu, 07 Aug 2008 15:45:00 -0400 Received: from [199.232.76.173] (port=50645 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KRBPv-0006f8-Np for grub-devel@gnu.org; Thu, 07 Aug 2008 15:44:59 -0400 Received: from mailout03.t-online.de ([194.25.134.81]:55922) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KRBPv-0004uq-MJ for grub-devel@gnu.org; Thu, 07 Aug 2008 15:44:59 -0400 Received: from fwd26.aul.t-online.de by mailout03.sul.t-online.de with smtp id 1KRBPs-0006Pb-00; Thu, 07 Aug 2008 21:44:56 +0200 Received: from [10.3.2.2] (G-f3rrZeZhpktDqiPZPOK-8+1VHD1sf3fxFwTzHmQfgvRTHfHBZTTBcpt8xpXeHwX7@[217.235.250.31]) by fwd26.aul.t-online.de with esmtp id 1KRBPe-1YCdqi0; Thu, 7 Aug 2008 21:44:42 +0200 Message-ID: <489B50AB.1040403@t-online.de> Date: Thu, 07 Aug 2008 21:44:43 +0200 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 MIME-Version: 1.0 To: The development of GRUB 2 References: <489B159A.2000106@t-online.de> <20080807161059.GB14153@thorin> In-Reply-To: <20080807161059.GB14153@thorin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: G-f3rrZeZhpktDqiPZPOK-8+1VHD1sf3fxFwTzHmQfgvRTHfHBZTTBcpt8xpXeHwX7 X-TOI-MSGID: 432e6def-e60b-4026-86d1-fd461d5c19f4 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] Fix infinite loop in grub_pit_wait() 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: Thu, 07 Aug 2008 19:45:01 -0000 Robert Millan wrote: > On Thu, Aug 07, 2008 at 05:32:42PM +0200, Christian Franke wrote: > >> grub2 from current SVN hangs if run in VirtualPC, the problem was >> introduced with 'svn diff -r 1779:1780'. >> > > I'm not familiar with this part of the PIT interface; why does it hang > only on VirtualPC? > > Possibly different BIOS init of 0x61? Or different implementation of the legacy hardware, which IIRC looks like this: . +-------+ /--------->0x61[5] . ...--Clock-->| Timer | | .0x61[0]---Gate-->| 2 |-Out-+->+---+ . +-------+ | & |-->Speaker .0x61[1]-------------------------->+---+ Resulting values of "tsc_ticks_per_ms" (AMD 3.2@2Ghz): . orig with patch VMware: ~1500 ~2000000 VirtualBox: ~2000000 ~2000000 VirtualPC: hang ~2000000 >> ... >> + /* Disable timer2 gate and speaker. */ >> + grub_outb (grub_inb (TIMER2_REG_LATCH) & ~ (TIMER2_SPEAKER | TIMER2_GATE), TIMER2_REG_LATCH); >> } >> > > This doesn't AFAICT preserve the existing value of the timer2 gate and speaker. > I assume that is ok? > > IMO yes. The timer state itself cannot be preserved, so it should be safe to leave it disabled. To test, try If BIOS speaker output (echo -e "\a") still works. > Thanks! > > You're welcome. Patch committed. Christian