aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2013-03-11 01:43:12 +0000
committerMichael Brown <mcb30@ipxe.org>2013-03-11 01:48:00 +0000
commitcb37d92ff6915b511163e0160b5587cce4d9bb1c (patch)
tree4198abc50e50a197fe97deabe9d69077c7096cfc /src
parent2629b7e2cd8975f02a159db461d2460b9275545e (diff)
downloadipxe-cb37d92ff6915b511163e0160b5587cce4d9bb1c.zip
ipxe-cb37d92ff6915b511163e0160b5587cce4d9bb1c.tar.gz
ipxe-cb37d92ff6915b511163e0160b5587cce4d9bb1c.tar.bz2
[romprefix] Display only one "Ctrl-B" prompt per PCI device during POST
If a multifunction PCI device exposes an iPXE ROM via each function, then each function will display a "Press Ctrl-B to configure iPXE" prompt, and delay for two seconds. Since a single instance of iPXE can drive all functions on the multifunction device, this simply adds unnecessary delay to the boot process. Fix by inhibiting the "Press Ctrl-B" prompt for all except the first function on a PCI device. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r--src/arch/i386/prefix/romprefix.S14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/arch/i386/prefix/romprefix.S b/src/arch/i386/prefix/romprefix.S
index 18fef75..091673d 100644
--- a/src/arch/i386/prefix/romprefix.S
+++ b/src/arch/i386/prefix/romprefix.S
@@ -23,6 +23,7 @@ FILE_LICENCE ( GPL2_OR_LATER )
( PMM_HANDLE_BASE | 0x00001000 )
#define PMM_HANDLE_BASE_DECOMPRESS_TO \
( 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
@@ -422,6 +423,9 @@ no_pmm:
xorw %di, %di
cs rep movsb
+ /* Skip prompt if this is not the first PCI function */
+ testb $PCI_FUNC_MASK, init_pci_busdevfn
+ jnz no_shell
/* Prompt for POST-time shell */
movw $init_message_prompt, %si
xorw %di, %di
@@ -440,7 +444,7 @@ no_pmm:
movw $init_message_done, %si
call print_message
popf
- jnz 2f
+ jnz no_shell
/* Ctrl-B was pressed: invoke iPXE. The keypress will be
* picked up by the initial shell prompt, and we will drop
* into a shell.
@@ -448,7 +452,11 @@ no_pmm:
xorl %ebp, %ebp /* Inhibit use of INT 15,e820 and INT 15,e801 */
pushw %cs
call exec
-2:
+no_shell:
+ movb $( '\n' ), %al
+ xorw %di, %di
+ call print_character
+
/* Restore registers */
popw %gs
popw %fs
@@ -595,7 +603,7 @@ init_message_done:
*
*/
init_pci_busdevfn:
- .word 0xffff
+ .word 0
.size init_pci_busdevfn, . - init_pci_busdevfn
/* Image source area