]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2008-05-15 Bean <bean123ch@gmail.com>
authorbean <bean@localhost>
Thu, 15 May 2008 11:51:22 +0000 (11:51 +0000)
committerbean <bean@localhost>
Thu, 15 May 2008 11:51:22 +0000 (11:51 +0000)
* kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
keyboard hang problem in apple's intel mac.

ChangeLog
kern/i386/pc/startup.S

index eb26bb11dbbb5ed520cd16a6b450a35c6acb9899..d40e7420c4b03073950b9f81cd029d22fdcf5fb7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-15  Bean  <bean123ch@gmail.com>
+
+       * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
+       keyboard hang problem in apple's intel mac.
+
 2008-05-09  Robert Millan  <rmh@aybabtu.com>
 
        * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
index 5d4bbcb99a020c5cdb482b89c396b73fc1c2405e..ebb98fe60b60ba4bfca37b3dd1f45386c5fd12ac 100644 (file)
@@ -1240,6 +1240,23 @@ 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.
+        */
+
+1:
+       movb    $1, %ah
+       int     $0x16
+       jnz     2f
+       hlt
+       jmp     1b
+
+2:
+
+       movb    $0, %ah
        int     $0x16
 
        movw    %ax, %dx                /* real_to_prot uses %eax */