Blame SOURCES/ipxe-Allow-prefix-to-specify-a-PCI-autoboot-device-locati.patch

57753c
From 8eaadd87cfe66d11e587c5470fc82472315cc20d Mon Sep 17 00:00:00 2001
57753c
From: Alex Williamson <alex.williamson@redhat.com>
57753c
Date: Mon, 3 Mar 2014 18:47:03 +0100
57753c
Subject: [PATCH 2/7] Allow prefix to specify a PCI autoboot device location
57753c
57753c
RH-Author: Alex Williamson <alex.williamson@redhat.com>
57753c
Message-id: <20140303184703.19235.50926.stgit@bling.home>
57753c
Patchwork-id: 57977
57753c
O-Subject: [RHEL7 ipxe PATCH 2/4] [prefix] Allow prefix to specify a PCI 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: 90fc273b2b099df4a2c2ca06e1eaa7508e9734be
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/core/pci_autoboot.c |   44 +++++++++++++++++++++++++++++++++++++
57753c
 1 file changed, 44 insertions(+)
57753c
 create mode 100644 src/arch/i386/core/pci_autoboot.c
57753c
57753c
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
57753c
---
57753c
 src/arch/i386/core/pci_autoboot.c |   44 +++++++++++++++++++++++++++++++++++++
57753c
 1 files changed, 44 insertions(+), 0 deletions(-)
57753c
 create mode 100644 src/arch/i386/core/pci_autoboot.c
57753c
57753c
diff --git a/src/arch/i386/core/pci_autoboot.c b/src/arch/i386/core/pci_autoboot.c
57753c
new file mode 100644
57753c
index 0000000..bbb4027
57753c
--- /dev/null
57753c
+++ b/src/arch/i386/core/pci_autoboot.c
57753c
@@ -0,0 +1,44 @@
57753c
+/*
57753c
+ * Copyright (C) 2014 Red Hat Inc.
57753c
+ *	Alex Williamson <alex.williamson@redhat.com>
57753c
+ *
57753c
+ * This program is free software; you can redistribute it and/or
57753c
+ * modify it under the terms of the GNU General Public License as
57753c
+ * published by the Free Software Foundation; either version 2 of the
57753c
+ * License, or any later version.
57753c
+ *
57753c
+ * This program is distributed in the hope that it will be useful, but
57753c
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
57753c
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
57753c
+ * General Public License for more details.
57753c
+ *
57753c
+ * You should have received a copy of the GNU General Public License
57753c
+ * along with this program; if not, write to the Free Software
57753c
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
57753c
+ * 02110-1301, USA.
57753c
+ */
57753c
+
57753c
+FILE_LICENCE ( GPL2_OR_LATER );
57753c
+
57753c
+#include <stdint.h>
57753c
+#include <ipxe/device.h>
57753c
+#include <ipxe/init.h>
57753c
+#include <realmode.h>
57753c
+#include <usr/autoboot.h>
57753c
+
57753c
+uint16_t __bss16 ( autoboot_busdevfn );
57753c
+#define autoboot_busdevfn __use_data16 ( autoboot_busdevfn )
57753c
+
57753c
+/**
57753c
+ * Initialise PCI autoboot device
57753c
+ */
57753c
+static void pci_autoboot_init ( void ) {
57753c
+
57753c
+	autoboot_device.bus_type = BUS_TYPE_PCI;
57753c
+	autoboot_device.location = autoboot_busdevfn;
57753c
+}
57753c
+
57753c
+/** PCI autoboot device initialisation function */
57753c
+struct init_fn pci_autoboot_init_fn __init_fn ( INIT_NORMAL ) = {
57753c
+	.initialise = pci_autoboot_init,
57753c
+};
57753c
-- 
57753c
1.7.1
57753c