iPXE
pci_autoboot.c
Go to the documentation of this file.
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 * You can also choose to distribute this program under the terms of
21 * the Unmodified Binary Distribution Licence (as given in the file
22 * COPYING.UBDL), provided that you have satisfied its requirements.
23 */
24
25FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
26
27#include <stdint.h>
28#include <ipxe/device.h>
29#include <ipxe/init.h>
30#include <realmode.h>
31#include <usr/autoboot.h>
32
34#define autoboot_busdevfn __use_data16 ( autoboot_busdevfn )
35
36/**
37 * Initialise PCI autoboot device
38 */
44
45/** PCI autoboot device initialisation function */
46struct init_fn pci_autoboot_init_fn __init_fn ( INIT_NORMAL ) = {
47 .name = "autoboot",
48 .initialise = pci_autoboot_init,
49};
unsigned short uint16_t
Definition stdint.h:11
void set_autoboot_busloc(unsigned int bus_type, unsigned int location)
Identify autoboot device by bus type and location.
Definition autoboot.c:491
Automatic booting.
Device model.
#define BUS_TYPE_PCI
PCI bus type.
Definition device.h:44
#define INIT_NORMAL
Normal initialisation.
Definition init.h:32
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define __init_fn(init_order)
Declare an initialisation functon.
Definition init.h:24
#define __bss16(variable)
Definition libkir.h:16
#define autoboot_busdevfn
static void pci_autoboot_init(void)
Initialise PCI autoboot device.
An initialisation function.
Definition init.h:15