summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Williamson2014-02-26 00:00:44 +0100
committerMichael Brown2014-03-03 16:35:08 +0100
commitc429bf0aa2428e6d12143285b29cbaf6a82f8d84 (patch)
tree977a6768faf57429c23c2f3e7aa47706cf30f618 /src
parent[prefix] Allow prefix to specify a PCI autoboot device location (diff)
downloadipxe-c429bf0aa2428e6d12143285b29cbaf6a82f8d84.tar.gz
ipxe-c429bf0aa2428e6d12143285b29cbaf6a82f8d84.tar.xz
ipxe-c429bf0aa2428e6d12143285b29cbaf6a82f8d84.zip
[romprefix] Store boot bus:dev.fn address as autoboot device location
Per the BIOS Boot Specification, the initialization phase of the ROM is called with the PFA (PCI Function Address) in the %ax register. The intention is that the ROM code will store that device address somewhere and use it for booting from that device when the Boot Entry Vector (BEV) is called. iPXE does store the PFA, but doesn't use it to select the boot network device. This renders BIOS IPL lists fairly ineffective. Fix by using the BBS-specified bus:dev.fn address as the autoboot device location. 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')
-rw-r--r--src/arch/i386/prefix/romprefix.S12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/arch/i386/prefix/romprefix.S b/src/arch/i386/prefix/romprefix.S
index e061932d7..d606006e8 100644
--- a/src/arch/i386/prefix/romprefix.S
+++ b/src/arch/i386/prefix/romprefix.S
@@ -738,7 +738,17 @@ exec: /* Set %ds = %cs */
pushw $1f
lret
.section ".text16", "awx", @progbits
-1: /* Call main() */
+1:
+ /* Retrieve PCI bus:dev.fn */
+ movw init_pci_busdevfn, %cx
+
+ /* Set up %ds for access to .data16 */
+ movw %bx, %ds
+
+ /* Store PCI bus:dev.fn */
+ movw %cx, autoboot_busdevfn
+
+ /* Call main() */
pushl $main
pushw %cs
call prot_call