grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix infinite loop in grub_pit_wait()


From: Christian Franke
Subject: Re: [PATCH] Fix infinite loop in grub_pit_wait()
Date: Thu, 07 Aug 2008 21:44:43 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11

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 address@hidden):

.           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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]