On Wed, May 7, 2008 at 8:55 PM, Robert Millan <[EMAIL PROTECTED]> wrote: > I think it'd be nice to have a comment there explaining why this is done.
Hi, You're right, here is the patch with comment: diff --git a/kern/i386/pc/startup.S b/kern/i386/pc/startup.S index 5d4bbcb..a67bf6d 100644 --- a/kern/i386/pc/startup.S +++ b/kern/i386/pc/startup.S @@ -1240,6 +1240,26 @@ FUNCTION(grub_console_getkey) call prot_to_real .code16 + /* + * Due to a bug in apple's bootcamp implementation, INT 16/AH = 0 would + * cause the machine to hang at the second keystroke. However, we can + * work around this problem by ensuring the presence of keystroke with + * INT 16/AH = 1 before calling INT 16/AH = 0. + */ + + pushfw + sti + +1: + movb $1, %ah + int $0x16 + jnz 2f + hlt + jmp 1b + +2: + popfw + movb $0, %ah int $0x16 movw %ax, %dx /* real_to_prot uses %eax */ -- Bean _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel