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? > void > grub_pit_wait (grub_uint16_t tics) > { > + /* Disable timer2 gate and speaker. */ > + grub_outb (grub_inb (TIMER2_REG_LATCH) & ~ (TIMER2_SPEAKER | TIMER2_GATE), > TIMER2_REG_LATCH); > + > + /* Set tics. */ > grub_outb (TIMER2_SELECT | TIMER_ENABLE_LSB | TIMER_ENABLE_MSB, > TIMER_REG_COMMAND); > grub_outb (tics & 0xff, TIMER2_REG_CONTROL); > grub_outb (tics >> 8, TIMER2_REG_CONTROL); > > + /* Enable timer2 gate, keep speaker disabled. */ > + grub_outb ((grub_inb (TIMER2_REG_LATCH) & ~ TIMER2_SPEAKER) | TIMER2_GATE, > TIMER2_REG_LATCH); > + > + /* Wait. */ > while ((grub_inb (TIMER2_REG_LATCH) & TIMER2_LATCH) == 0x00); > + > + /* 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? Thanks! -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel