[haiku-commits] r41117 - haiku/trunk/src/system/boot/platform/bios_ia32

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 26 Mar 2011 21:01:37 +0100 (CET)

Author: axeld
Date: 2011-03-26 21:01:37 +0100 (Sat, 26 Mar 2011)
New Revision: 41117
Changeset: https://dev.haiku-os.org/changeset/41117
Ticket: https://dev.haiku-os.org/ticket/2654

Modified:
   haiku/trunk/src/system/boot/platform/bios_ia32/keyboard.cpp
Log:
* Applied patch by VinDuv/Jonas to use the existing check_for_key() that fixes
  a problem on the Mac which obviously messed up its BIOS.
* This busy loops, but CPU utilization should be a maxed out in the boot loader
  anyway - we could add a pause, though.
* This closes bug #2654.


Modified: haiku/trunk/src/system/boot/platform/bios_ia32/keyboard.cpp
===================================================================
--- haiku/trunk/src/system/boot/platform/bios_ia32/keyboard.cpp 2011-03-26 
19:24:53 UTC (rev 41116)
+++ haiku/trunk/src/system/boot/platform/bios_ia32/keyboard.cpp 2011-03-26 
20:01:37 UTC (rev 41117)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-2010, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx
+ * Copyright 2004-2011, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx
  * Distributed under the terms of the MIT License.
  */
 
@@ -43,12 +43,10 @@
 extern "C" union key
 wait_for_key(void)
 {
-       bios_regs regs;
-       regs.eax = 0;
-       call_bios(0x16, &regs);
-
        union key key;
-       key.ax = regs.eax & 0xffff;
+       do {
+               key.ax = check_for_key();
+       } while (key.ax == 0);
 
        return key;
 }


Other related posts:

  • » [haiku-commits] r41117 - haiku/trunk/src/system/boot/platform/bios_ia32 - axeld