Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
intel_vtd.h File Reference
#include <drivers/pcie/msi.h>

Go to the source code of this file.

Data Structures

struct  vtd_driver_api
 

Typedefs

typedef int(* vtd_alloc_entries_f) (const struct device *dev, uint8_t n_entries)
 
typedef uint32_t(* vtd_remap_msi_f) (const struct device *dev, msi_vector_t *vector)
 
typedef int(* vtd_remap_f) (const struct device *dev, msi_vector_t *vector)
 

Functions

static int vtd_allocate_entries (const struct device *dev, uint8_t n_entries)
 Allocate contiguous IRTEs. More...
 
static uint32_t vtd_remap_msi (const struct device *dev, msi_vector_t *vector)
 Generate the MSI Message Address data for the given vector. More...
 
static int vtd_remap (const struct device *dev, msi_vector_t *vector)
 Remap the given vector. More...
 

Typedef Documentation

◆ vtd_alloc_entries_f

typedef int(* vtd_alloc_entries_f) (const struct device *dev, uint8_t n_entries)

◆ vtd_remap_f

typedef int(* vtd_remap_f) (const struct device *dev, msi_vector_t *vector)

◆ vtd_remap_msi_f

typedef uint32_t(* vtd_remap_msi_f) (const struct device *dev, msi_vector_t *vector)

Function Documentation

◆ vtd_allocate_entries()

static int vtd_allocate_entries ( const struct device dev,
uint8_t  n_entries 
)
inlinestatic

Allocate contiguous IRTEs.

Parameters
devPointer to the device structure for the driver instance
n_entriesHow many IRTE to allocate

Note: It will try to allocate all, or it will fail.

Returns
The first allocated IRTE index, or -EBUSY on failure

◆ vtd_remap()

static int vtd_remap ( const struct device dev,
msi_vector_t vector 
)
inlinestatic

Remap the given vector.

Parameters
devPointer to the device structure for the driver instance
vectorA valid allocated MSI vector
Returns
0 on success, a negative errno otherwise

◆ vtd_remap_msi()

static uint32_t vtd_remap_msi ( const struct device dev,
msi_vector_t vector 
)
inlinestatic

Generate the MSI Message Address data for the given vector.

Parameters
devPointer to the device structure for the driver instance
vectorA valid allocated MSI vector
Returns
The MSI Message Address value