Bläddra i källkod

[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>
tags/v1.20.1
Alex Williamson 10 år sedan
förälder
incheckning
c429bf0aa2
1 ändrade filer med 11 tillägg och 1 borttagningar
  1. 11
    1
      src/arch/i386/prefix/romprefix.S

+ 11
- 1
src/arch/i386/prefix/romprefix.S Visa fil

@@ -738,7 +738,17 @@ exec:	/* Set %ds = %cs */
738 738
 	pushw	$1f
739 739
 	lret
740 740
 	.section ".text16", "awx", @progbits
741
-1:	/* Call main() */
741
+1:
742
+	/* Retrieve PCI bus:dev.fn */
743
+	movw	init_pci_busdevfn, %cx
744
+
745
+	/* Set up %ds for access to .data16 */
746
+	movw	%bx, %ds
747
+
748
+	/* Store PCI bus:dev.fn */
749
+	movw	%cx, autoboot_busdevfn
750
+
751
+	/* Call main() */
742 752
 	pushl	$main
743 753
 	pushw	%cs
744 754
 	call	prot_call

Laddar…
Avbryt
Spara