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

[Xen-changelog] [xen-unstable] rombios: Get rid of annoying delay at F12 boot menu.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1231257973 0
# Node ID 284a65851f54ece7f9cab8ec4da219be9c0fe752
# Parent  883d01b2fd72cc7d54196e23f2a3f0a56c0432e0
rombios: Get rid of annoying delay at F12 boot menu.
Instead require the F12 to be pressed before the menu prompt appears.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/firmware/rombios/rombios.c |   98 +++++++++++++++++++--------------------
 1 files changed, 48 insertions(+), 50 deletions(-)

diff -r 883d01b2fd72 -r 284a65851f54 tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Tue Jan 06 16:02:10 2009 +0000
+++ b/tools/firmware/rombios/rombios.c  Tue Jan 06 16:06:13 2009 +0000
@@ -2141,64 +2141,62 @@ interactive_bootkey()
   Bit16u valid_choice = 0;
   Bit16u ebda_seg = read_word(0x0040, 0x000E);
 
+  printf("\n\nPress F12 for boot menu.\n\n");
+
   while (check_for_keystroke())
-    get_keystroke();
-
-  printf("\nPress F12 for boot menu.\n\n");
-
-  delay_ticks_and_check_for_keystroke(11, 5); /* ~3 seconds */
-  if (check_for_keystroke())
   {
     scan_code = get_keystroke();
-    if (scan_code == 0x86) /* F12 */
+    if (scan_code != 0x86) /* F12 */
+      continue;
+
+    while (check_for_keystroke())
+      get_keystroke();
+
+    printf("Select boot device:\n\n");
+
+    count = read_word(ebda_seg, IPL_COUNT_OFFSET);
+    for (i = 0; i < count; i++)
     {
-      while (check_for_keystroke())
-        get_keystroke();
-
-      printf("Select boot device:\n\n");
-
-      count = read_word(ebda_seg, IPL_COUNT_OFFSET);
-      for (i = 0; i < count; i++)
+      memcpyb(ss, &e, ebda_seg, IPL_TABLE_OFFSET + i * sizeof (e), sizeof (e));
+      printf("%d. ", i+1);
+      switch(e.type)
       {
-        memcpyb(ss, &e, ebda_seg, IPL_TABLE_OFFSET + i * sizeof (e), sizeof 
(e));
-        printf("%d. ", i+1);
-        switch(e.type)
-        {
-          case IPL_TYPE_FLOPPY:
-          case IPL_TYPE_HARDDISK:
-          case IPL_TYPE_CDROM:
-            printf("%s\n", drivetypes[e.type]);
-            break;
-          case IPL_TYPE_BEV:
-            printf("%s", drivetypes[4]);
-            if (e.description != 0)
-            {
-              memcpyb(ss, &description, (Bit16u)(e.description >> 16), 
(Bit16u)(e.description & 0xffff), 32);
-              description[32] = 0;
-              printf(" [%S]", ss, description);
-           }
-           printf("\n");
-           break;
-        }
+        case IPL_TYPE_FLOPPY:
+        case IPL_TYPE_HARDDISK:
+        case IPL_TYPE_CDROM:
+          printf("%s\n", drivetypes[e.type]);
+          break;
+        case IPL_TYPE_BEV:
+          printf("%s", drivetypes[4]);
+          if (e.description != 0)
+          {
+            memcpyb(ss, &description, (Bit16u)(e.description >> 16), 
(Bit16u)(e.description & 0xffff), 32);
+            description[32] = 0;
+            printf(" [%S]", ss, description);
+         }
+         printf("\n");
+         break;
       }
-
-      count++;
-      while (!valid_choice) {
-        scan_code = get_keystroke();
-        if (scan_code == 0x01 || scan_code == 0x58) /* ESC or F12 */
-        {
-          valid_choice = 1;
-        }
-        else if (scan_code <= count)
-        {
-          valid_choice = 1;
-          scan_code -= 1;
-          /* Set user selected device */
-          write_word(ebda_seg, IPL_BOOTFIRST_OFFSET, scan_code);
-        }
+    }
+
+    count++;
+    while (!valid_choice) {
+      scan_code = get_keystroke();
+      if (scan_code == 0x01 || scan_code == 0x58) /* ESC or F12 */
+      {
+        valid_choice = 1;
       }
+      else if (scan_code <= count)
+      {
+        valid_choice = 1;
+        scan_code -= 1;
+        /* Set user selected device */
+        write_word(ebda_seg, IPL_BOOTFIRST_OFFSET, scan_code);
+      }
+    }
+
     printf("\n");
-    }
+    break;
   }
 }
 #endif // BX_ELTORITO_BOOT

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.