iPXE
Data Structures | Macros | 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...
 

Macros

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

Functions

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

Variables

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

Detailed Description

Linux devices, drivers and device requests.

Definition in file linux.h.

Macro Definition Documentation

◆ ELINUX

#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.

◆ LINUX_DRIVERS

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

Linux driver table.

Definition at line 66 of file linux.h.

◆ __linux_driver

#define __linux_driver   __table_entry(LINUX_DRIVERS, 01)

Declare a Linux driver.

Definition at line 69 of file linux.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER  )

◆ linux_set_drvdata()

static void linux_set_drvdata ( struct linux_device device,
void *  priv 
)
inlinestatic

Set linux device driver-private data.

Parameters
deviceLinux device
privPrivate data

Definition at line 77 of file linux.h.

78 {
79  device->priv = priv;
80 }
A hardware device.
Definition: device.h:73
static struct tlan_private * priv
Definition: tlan.c:224

References priv.

◆ linux_get_drvdata()

static void* linux_get_drvdata ( struct linux_device device)
inlinestatic

Get linux device driver-private data.

Parameters
deviceLinux device
Return values
privPrivate data

Definition at line 88 of file linux.h.

89 {
90  return device->priv;
91 }
A hardware device.
Definition: device.h:73

◆ linux_find_setting()

struct linux_setting* linux_find_setting ( char *  name,
struct list_head settings 
)

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

◆ linux_apply_settings()

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

◆ linux_device_requests

struct list_head linux_device_requests

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().

◆ linux_global_settings

struct list_head linux_global_settings

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().