From 67ea9d3b8c923445534d80baf40d9c6716b108cc Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 23 May 2008 11:58:08 +0100 Subject: [PATCH] rombios: Remove annoying 3-second boot delay waiting for user to hit F10 to select boot device. This will be rarely used, and it is possible to hit F10 before the message is displayed and the keypress will still register. So in practice it is quite possibel to use this boot feature reliably without needing a multi-second delay. Signed-off-by: Keir Fraser --- tools/firmware/rombios/rombios.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/tools/firmware/rombios/rombios.c b/tools/firmware/rombios/rombios.c index a6191d30fe..23558e8f45 100644 --- a/tools/firmware/rombios/rombios.c +++ b/tools/firmware/rombios/rombios.c @@ -2225,26 +2225,12 @@ void interactive_bootkey() Bit16u i; Bit8u scan = 0; - bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "\n\nPress F10 to select boot device.\n"); - for (i = 3; i > 0; i--) - { - scan = wait(WAIT_HZ, 0); - switch (scan) { - case 0x3D: - case 0x3E: - case 0x3F: - case 0x58: - break; - case 0x44: - scan = bootmenu(inb_cmos(0x3d) & 0x0f); - break; - default: - scan = 0; - break; - } - if (scan != 0) - break; - } + bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, + "\n\nPress F10 to select boot device.\n"); + + scan = wait(1, 0); + if (scan == 0x44) + scan = bootmenu(inb_cmos(0x3d) & 0x0f); /* set the default based on the keypress or menu */ switch(scan) { -- 2.30.2