Blame SOURCES/ipxe-Store-boot-bus-dev.fn-address-as-autoboot-device-loc.patch

57753c
From b745ae34559366ccc158f5782cfb81eeb054d62f Mon Sep 17 00:00:00 2001
57753c
From: Alex Williamson <alex.williamson@redhat.com>
57753c
Date: Mon, 3 Mar 2014 18:47:09 +0100
57753c
Subject: [PATCH 3/7] Store boot bus:dev.fn address as autoboot device location
57753c
57753c
RH-Author: Alex Williamson <alex.williamson@redhat.com>
57753c
Message-id: <20140303184709.19235.66132.stgit@bling.home>
57753c
Patchwork-id: 57978
57753c
O-Subject: [RHEL7 ipxe PATCH 3/4] [romprefix] Store boot bus:dev.fn address as autoboot device location
57753c
Bugzilla: 1031518
57753c
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
57753c
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
57753c
RH-Acked-by: Vlad Yasevich <vyasevic@redhat.com>
57753c
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
57753c
57753c
Bugzilla: 1031518
57753c
Upstream: c429bf0aa2428e6d12143285b29cbaf6a82f8d84
57753c
57753c
Per the BIOS Boot Specification, the initialization phase of the ROM
57753c
is called with the PFA (PCI Function Address) in the %ax register.
57753c
The intention is that the ROM code will store that device address
57753c
somewhere and use it for booting from that device when the Boot Entry
57753c
Vector (BEV) is called.  iPXE does store the PFA, but doesn't use it
57753c
to select the boot network device.  This renders BIOS IPL lists fairly
57753c
ineffective.
57753c
57753c
Fix by using the BBS-specified bus:dev.fn address as the autoboot
57753c
device location.
57753c
57753c
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
57753c
Modified-by: Michael Brown <mcb30@ipxe.org>
57753c
Signed-off-by: Michael Brown <mcb30@ipxe.org>
57753c
---
57753c
 src/arch/i386/prefix/romprefix.S |   12 +++++++++++-
57753c
 1 file changed, 11 insertions(+), 1 deletion(-)
57753c
57753c
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
57753c
---
57753c
 src/arch/i386/prefix/romprefix.S |   12 +++++++++++-
57753c
 1 files changed, 11 insertions(+), 1 deletions(-)
57753c
57753c
diff --git a/src/arch/i386/prefix/romprefix.S b/src/arch/i386/prefix/romprefix.S
57753c
index 091673d..c75b9b9 100644
57753c
--- a/src/arch/i386/prefix/romprefix.S
57753c
+++ b/src/arch/i386/prefix/romprefix.S
57753c
@@ -742,7 +742,17 @@ exec:	/* Set %ds = %cs */
57753c
 	pushw	$1f
57753c
 	lret
57753c
 	.section ".text16", "awx", @progbits
57753c
-1:	/* Call main() */
57753c
+1:
57753c
+	/* Retrieve PCI bus:dev.fn */
57753c
+	movw	init_pci_busdevfn, %cx
57753c
+
57753c
+	/* Set up %ds for access to .data16 */
57753c
+	movw	%bx, %ds
57753c
+
57753c
+	/* Store PCI bus:dev.fn */
57753c
+	movw	%cx, autoboot_busdevfn
57753c
+
57753c
+	/* Call main() */
57753c
 	pushl	$main
57753c
 	pushw	%cs
57753c
 	call	prot_call
57753c
-- 
57753c
1.7.1
57753c