aboutsummaryrefslogtreecommitdiff
path: root/kvm
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@web.de>2009-07-02 00:11:44 +0200
committerAvi Kivity <avi@redhat.com>2009-07-28 19:36:35 +0300
commita73f8a64e9e22ffd22abfba8d4a7aba165d08d26 (patch)
tree6e5b9c483291ba9ed559046726fab4296a39579f /kvm
parentkvm: bios: port firmware config movement to rombios.h (diff)
downloadqemu-kvm-a73f8a64e9e22ffd22abfba8d4a7aba165d08d26.tar.gz
qemu-kvm-a73f8a64e9e22ffd22abfba8d4a7aba165d08d26.tar.bz2
qemu-kvm-a73f8a64e9e22ffd22abfba8d4a7aba165d08d26.zip
kvm: bios: Make boot prompt optional
Check via QEMU's firmware configuration interface if the boot prompt should be given. This allows to disable the prompt with its several seconds long delay, speeding up the common boot case. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'kvm')
-rw-r--r--kvm/bios/rombios.c19
-rw-r--r--kvm/bios/rombios.h1
2 files changed, 20 insertions, 0 deletions
diff --git a/kvm/bios/rombios.c b/kvm/bios/rombios.c
index 618619978..6e1d446dc 100644
--- a/kvm/bios/rombios.c
+++ b/kvm/bios/rombios.c
@@ -2015,6 +2015,21 @@ Bit16u i; ipl_entry_t *e;
}
#if BX_ELTORITO_BOOT
+#ifdef BX_QEMU
+int
+qemu_cfg_probe_bootkey()
+{
+ outw(QEMU_CFG_CTL_PORT, QEMU_CFG_SIGNATURE);
+ if (inb(QEMU_CFG_DATA_PORT) != 'Q' ||
+ inb(QEMU_CFG_DATA_PORT) != 'E' ||
+ inb(QEMU_CFG_DATA_PORT) != 'M' ||
+ inb(QEMU_CFG_DATA_PORT) != 'U') return 1;
+
+ outw(QEMU_CFG_CTL_PORT, QEMU_CFG_BOOT_MENU);
+ return inb(QEMU_CFG_DATA_PORT);
+}
+#endif // BX_QEMU
+
void
interactive_bootkey()
{
@@ -2026,6 +2041,10 @@ interactive_bootkey()
Bit16u ss = get_SS();
Bit16u valid_choice = 0;
+#ifdef BX_QEMU
+ if (!qemu_cfg_probe_bootkey()) return;
+#endif
+
while (check_for_keystroke())
get_keystroke();
diff --git a/kvm/bios/rombios.h b/kvm/bios/rombios.h
index 04b33a807..c8f64f3f5 100644
--- a/kvm/bios/rombios.h
+++ b/kvm/bios/rombios.h
@@ -67,6 +67,7 @@
#define QEMU_CFG_ID 0x01
#define QEMU_CFG_UUID 0x02
#define QEMU_CFG_NUMA 0x0d
+#define QEMU_CFG_BOOT_MENU 0x0e
#define QEMU_CFG_ARCH_LOCAL 0x8000
#define QEMU_CFG_ACPI_TABLES (QEMU_CFG_ARCH_LOCAL + 0)
#define QEMU_CFG_SMBIOS_ENTRIES (QEMU_CFG_ARCH_LOCAL + 1)