aboutsummaryrefslogtreecommitdiffstats
path: root/src/arch/i386/prefix
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2014-02-25 16:33:08 -0700
committerMichael Brown <mcb30@ipxe.org>2014-03-03 13:09:25 +0000
commit27d1b40ee961d0910576a094a71dea1211254776 (patch)
tree316e8838adaa4b717832670bc77f7a50edf8a4c6 /src/arch/i386/prefix
parentf22c19f3fb53aa323f2297c62fc08f368b19cdc8 (diff)
downloadipxe-27d1b40ee961d0910576a094a71dea1211254776.tar.gz
[romprefix] Allow ROM banner timeout to be configured independently
iPXE currently prints a "Press Ctrl-B" banner twice: once when the ROM is first called for initialisation and again if we attempt to boot from the ROM. This slows boot, especially when the NIC is not the primary boot device. Tools such as libguestfs make use of QEMU VMs for performing maintenance on disk images and may make use of NICs in the VM for network support. If iPXE introduces a static init-time delay, that directly translates to increased runtime for the tools. Fix by allowing the ROM banner timeout to be configured independently of the main banner timeout. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/i386/prefix')
-rw-r--r--src/arch/i386/prefix/romprefix.S10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/arch/i386/prefix/romprefix.S b/src/arch/i386/prefix/romprefix.S
index 091673d3..e061932d 100644
--- a/src/arch/i386/prefix/romprefix.S
+++ b/src/arch/i386/prefix/romprefix.S
@@ -25,12 +25,8 @@ FILE_LICENCE ( GPL2_OR_LATER )
( PMM_HANDLE_BASE | 0x00002000 )
#define PCI_FUNC_MASK 0x07
-/* ROM banner timeout. Based on the configurable BANNER_TIMEOUT in
- * config.h, but converted to a number of (18Hz) timer ticks, and
- * doubled to allow for BIOSes that switch video modes immediately
- * beforehand, so rendering the message almost invisible to the user.
- */
-#define ROM_BANNER_TIMEOUT ( 2 * ( 18 * BANNER_TIMEOUT ) / 10 )
+/* ROM banner timeout, converted to a number of (18Hz) timer ticks. */
+#define ROM_BANNER_TIMEOUT_TICKS ( ( 18 * ROM_BANNER_TIMEOUT ) / 10 )
/* Allow payload to be excluded from ROM size
*/
@@ -791,7 +787,7 @@ wait_for_key:
int $0x16
jmp 1b
2: /* Wait for a key press */
- movw $ROM_BANNER_TIMEOUT, %cx
+ movw $ROM_BANNER_TIMEOUT_TICKS, %cx
3: decw %cx
js 99f /* Exit with ZF clear */
/* Wait for timer tick to be updated */