Skip to content

Commit

Permalink
[romprefix] Store boot bus:dev.fn address as autoboot device location
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
awilliam authored and mcb30 committed Mar 3, 2014
1 parent 90fc273 commit c429bf0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/arch/i386/prefix/romprefix.S
Expand Up @@ -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
Expand Down

0 comments on commit c429bf0

Please sign in to comment.