iPXE
Data Structures | Defines | Functions | Variables
linux.h File Reference

Linux devices, drivers and device requests. More...

#include <ipxe/list.h>
#include <ipxe/device.h>
#include <ipxe/settings.h>

Go to the source code of this file.

Data Structures

struct  linux_device
 A linux device. More...
struct  linux_driver
 A linux driver. More...
struct  linux_device_request
 A device request. More...
struct  linux_setting
 A device request setting. More...

Defines

#define ELINUX(errno)   EPLATFORM ( EINFO_EPLATFORM, errno )
 Convert a Linux error number to an iPXE status code.
#define LINUX_DRIVERS   __table(struct linux_driver, "linux_drivers")
 Linux driver table.
#define __linux_driver   __table_entry(LINUX_DRIVERS, 01)
 Declare a Linux driver.

Functions

 FILE_LICENCE (GPL2_OR_LATER)
static void linux_set_drvdata (struct linux_device *device, void *priv)
 Set linux device driver-private data.
static void * linux_get_drvdata (struct linux_device *device)
 Get linux device driver-private data.
struct linux_settinglinux_find_setting (char *name, struct list_head *settings)
 Look for the last occurrence of a setting with the specified name.
void linux_apply_settings (struct list_head *new_settings, struct settings *settings_block)
 Apply a list of linux settings to a settings block.

Variables

struct list_head linux_device_requests
 List of requested devices.
struct list_head linux_global_settings
 List of global settings to apply.

Detailed Description

Linux devices, drivers and device requests.

Definition in file linux.h.


Define Documentation

#define ELINUX (   errno)    EPLATFORM ( EINFO_EPLATFORM, errno )

Convert a Linux error number to an iPXE status code.

Parameters:
errnoLinux error number
Return values:
rciPXE status code (before negation)

Definition at line 39 of file linux.h.

#define LINUX_DRIVERS   __table(struct linux_driver, "linux_drivers")

Linux driver table.

Definition at line 66 of file linux.h.

Declare a Linux driver.

Definition at line 69 of file linux.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER  )
static void linux_set_drvdata ( struct linux_device device,
void *  priv 
) [inline, static]

Set linux device driver-private data.

Parameters:
deviceLinux device
privPrivate data

Definition at line 77 of file linux.h.

References linux_device::priv, and priv.

{
        device->priv = priv;
}
static void* linux_get_drvdata ( struct linux_device device) [inline, static]

Get linux device driver-private data.

Parameters:
deviceLinux device
Return values:
privPrivate data

Definition at line 88 of file linux.h.

References linux_device::priv.

{
        return device->priv;
}
struct linux_setting* linux_find_setting ( char *  name,
struct list_head settings 
) [read]

Look for the last occurrence of a setting with the specified name.

Parameters:
nameName of the setting to look for
settingsList of the settings to look through
void linux_apply_settings ( struct list_head new_settings,
struct settings settings_block 
)

Apply a list of linux settings to a settings block.

Parameters:
new_settingsList of linux_setting's to apply
settings_blockSettings block to apply the settings to
Return values:
rc0 on success

Variable Documentation

List of requested devices.

Filled by the UI code. Linux root_driver walks over this list looking for an appropriate driver to handle each request by matching the driver's name.

Referenced by linux_args_cleanup(), and parse_net_args().

List of global settings to apply.

Filled by the UI code. Linux root_driver applies these settings.

Referenced by linux_args_cleanup(), and parse_settings_args().