1
From fff8ffe1c92474ee58ebd6da82fede0ab7929214 Mon Sep 17 00:00:00 2001
2
From: Jan Kiszka <jan.kiszka@web.de>
3
Date: Thu, 2 Jul 2009 00:11:44 +0200
4
Subject: [PATCH 2/2] bochs-bios: Make boot prompt optional
6
Check via QEMU's firmware configuration interface if the boot prompt
7
should be given. This allows to disable the prompt with its several
8
seconds long delay, speeding up the common boot case.
10
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
11
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13
bios/rombios.c | 19 +++++++++++++++++++
15
2 files changed, 20 insertions(+), 0 deletions(-)
17
diff --git a/bios/rombios.c b/bios/rombios.c
18
index 0f13b53..560e6d5 100644
21
@@ -2015,6 +2015,21 @@ Bit16u i; ipl_entry_t *e;
27
+qemu_cfg_probe_bootkey()
29
+ outw(QEMU_CFG_CTL_PORT, QEMU_CFG_SIGNATURE);
30
+ if (inb(QEMU_CFG_DATA_PORT) != 'Q' ||
31
+ inb(QEMU_CFG_DATA_PORT) != 'E' ||
32
+ inb(QEMU_CFG_DATA_PORT) != 'M' ||
33
+ inb(QEMU_CFG_DATA_PORT) != 'U') return 1;
35
+ outw(QEMU_CFG_CTL_PORT, QEMU_CFG_BOOT_MENU);
36
+ return inb(QEMU_CFG_DATA_PORT);
43
@@ -2026,6 +2041,10 @@ interactive_bootkey()
45
Bit16u valid_choice = 0;
48
+ if (!qemu_cfg_probe_bootkey()) return;
51
while (check_for_keystroke())
54
diff --git a/bios/rombios.h b/bios/rombios.h
55
index 59ce19d..8ece2ee 100644
59
#define QEMU_CFG_ID 0x01
60
#define QEMU_CFG_UUID 0x02
61
#define QEMU_CFG_NUMA 0x0d
62
+#define QEMU_CFG_BOOT_MENU 0x0e
63
#define QEMU_CFG_ARCH_LOCAL 0x8000
64
#define QEMU_CFG_ACPI_TABLES (QEMU_CFG_ARCH_LOCAL + 0)
65
#define QEMU_CFG_SMBIOS_ENTRIES (QEMU_CFG_ARCH_LOCAL + 1)