Преглед на файлове

[prefix] Allow prefix to specify a PCI 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 години
родител
ревизия
90fc273b2b
променени са 1 файла, в които са добавени 44 реда и са изтрити 0 реда
  1. 44
    0
      src/arch/i386/core/pci_autoboot.c

+ 44
- 0
src/arch/i386/core/pci_autoboot.c Целия файл

@@ -0,0 +1,44 @@
1
+/*
2
+ * Copyright (C) 2014 Red Hat Inc.
3
+ *	Alex Williamson <alex.williamson@redhat.com>
4
+ *
5
+ * This program is free software; you can redistribute it and/or
6
+ * modify it under the terms of the GNU General Public License as
7
+ * published by the Free Software Foundation; either version 2 of the
8
+ * License, or any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful, but
11
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
+ * General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program; if not, write to the Free Software
17
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18
+ * 02110-1301, USA.
19
+ */
20
+
21
+FILE_LICENCE ( GPL2_OR_LATER );
22
+
23
+#include <stdint.h>
24
+#include <ipxe/device.h>
25
+#include <ipxe/init.h>
26
+#include <realmode.h>
27
+#include <usr/autoboot.h>
28
+
29
+uint16_t __bss16 ( autoboot_busdevfn );
30
+#define autoboot_busdevfn __use_data16 ( autoboot_busdevfn )
31
+
32
+/**
33
+ * Initialise PCI autoboot device
34
+ */
35
+static void pci_autoboot_init ( void ) {
36
+
37
+	autoboot_device.bus_type = BUS_TYPE_PCI;
38
+	autoboot_device.location = autoboot_busdevfn;
39
+}
40
+
41
+/** PCI autoboot device initialisation function */
42
+struct init_fn pci_autoboot_init_fn __init_fn ( INIT_NORMAL ) = {
43
+	.initialise = pci_autoboot_init,
44
+};

Loading…
Отказ
Запис