Go to the source code of this file.
|
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, uint8_t n_vector) |
|
typedef int(* | vtd_remap_f) (const struct device *dev, uint8_t irte_idx, uint16_t vector, uint32_t flags, uint16_t src_id) |
|
typedef int(* | vtd_set_irte_vector_f) (const struct device *dev, uint8_t irte_idx, uint16_t vector) |
|
typedef int(* | vtd_get_irte_by_vector_f) (const struct device *dev, uint16_t vector) |
|
typedef uint16_t(* | vtd_get_irte_vector_f) (const struct device *dev, uint8_t irte_idx) |
|
typedef int(* | vtd_set_irte_irq_f) (const struct device *dev, uint8_t irte_idx, unsigned int irq) |
|
typedef int(* | vtd_get_irte_by_irq_f) (const struct device *dev, unsigned int irq) |
|
typedef void(* | vtd_set_irte_msi_f) (const struct device *dev, uint8_t irte_idx, bool msi) |
|
typedef bool(* | vtd_irte_is_msi_f) (const struct device *dev, uint8_t irte_idx) |
|
|
static int | vtd_allocate_entries (const struct device *dev, uint8_t n_entries) |
| Allocate contiguous IRTEs.
|
|
static uint32_t | vtd_remap_msi (const struct device *dev, msi_vector_t *vector, uint8_t n_vector) |
| Generate the MSI Message Address data for the given vector.
|
|
static int | vtd_remap (const struct device *dev, uint8_t irte_idx, uint16_t vector, uint32_t flags, uint16_t src_id) |
| Remap the given vector.
|
|
static int | vtd_set_irte_vector (const struct device *dev, uint8_t irte_idx, uint16_t vector) |
| Set the vector on the allocated irte.
|
|
static int | vtd_get_irte_by_vector (const struct device *dev, uint16_t vector) |
| Get the irte allocated for the given vector.
|
|
static uint16_t | vtd_get_irte_vector (const struct device *dev, uint8_t irte_idx) |
| Get the vector given to the IRTE.
|
|
static int | vtd_set_irte_irq (const struct device *dev, uint8_t irte_idx, unsigned int irq) |
| Set the irq on the allocated irte.
|
|
static int | vtd_get_irte_by_irq (const struct device *dev, unsigned int irq) |
| Get the irte allocated for the given irq.
|
|
static void | vtd_set_irte_msi (const struct device *dev, uint8_t irte_idx, bool msi) |
|
static bool | vtd_irte_is_msi (const struct device *dev, uint8_t irte_idx) |
|
◆ vtd_alloc_entries_f
typedef int(* vtd_alloc_entries_f) (const struct device *dev, uint8_t n_entries) |
◆ vtd_get_irte_by_irq_f
typedef int(* vtd_get_irte_by_irq_f) (const struct device *dev, unsigned int irq) |
◆ vtd_get_irte_by_vector_f
typedef int(* vtd_get_irte_by_vector_f) (const struct device *dev, uint16_t vector) |
◆ vtd_get_irte_vector_f
◆ vtd_irte_is_msi_f
◆ vtd_remap_f
◆ vtd_remap_msi_f
◆ vtd_set_irte_irq_f
◆ vtd_set_irte_msi_f
typedef void(* vtd_set_irte_msi_f) (const struct device *dev, uint8_t irte_idx, bool msi) |
◆ vtd_set_irte_vector_f
◆ vtd_allocate_entries()
static int vtd_allocate_entries |
( |
const struct device * |
dev, |
|
|
uint8_t |
n_entries |
|
) |
| |
|
inlinestatic |
Allocate contiguous IRTEs.
- Parameters
-
dev | Pointer to the device structure for the driver instance |
n_entries | How 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_get_irte_by_irq()
static int vtd_get_irte_by_irq |
( |
const struct device * |
dev, |
|
|
unsigned int |
irq |
|
) |
| |
|
inlinestatic |
Get the irte allocated for the given irq.
- Parameters
-
dev | Pointer to the device structure for the driver instance |
irq | A valid IRQ number |
- Returns
- 0 or positive value on success, a negative errno otherwise
◆ vtd_get_irte_by_vector()
static int vtd_get_irte_by_vector |
( |
const struct device * |
dev, |
|
|
uint16_t |
vector |
|
) |
| |
|
inlinestatic |
Get the irte allocated for the given vector.
- Parameters
-
dev | Pointer to the device structure for the driver instance |
vector | An allocated interrupt vector |
- Returns
- 0 or positive value on success, a negative errno otherwise
◆ vtd_get_irte_vector()
Get the vector given to the IRTE.
- Parameters
-
dev | Pointer to the device structure for the driver instance |
irte_idx | A previously allocated irte entry index number |
- Returns
- the vector set to this IRTE
◆ vtd_irte_is_msi()
◆ vtd_remap()
Remap the given vector.
- Parameters
-
dev | Pointer to the device structure for the driver instance |
irte_idx | A previously allocated irte entry index number |
vector | An allocated interrupt vector |
flags | interrupt flags |
src_id | a valid source ID or USHRT_MAX if none |
- Returns
- 0 on success, a negative errno otherwise
◆ vtd_remap_msi()
Generate the MSI Message Address data for the given vector.
- Parameters
-
dev | Pointer to the device structure for the driver instance |
vector | A valid allocated MSI vector array |
n_vector | the size of the vector array |
- Returns
- The MSI Message Address value
◆ vtd_set_irte_irq()
Set the irq on the allocated irte.
- Parameters
-
dev | Pointer to the device structure for the driver instance |
irte_idx | A previously allocated irte entry index number |
irq | A valid IRQ number |
- Returns
- 0, a negative errno otherwise
◆ vtd_set_irte_msi()
static void vtd_set_irte_msi |
( |
const struct device * |
dev, |
|
|
uint8_t |
irte_idx, |
|
|
bool |
msi |
|
) |
| |
|
inlinestatic |
◆ vtd_set_irte_vector()
Set the vector on the allocated irte.
- Parameters
-
dev | Pointer to the device structure for the driver instance |
irte_idx | A previously allocated irte entry index number |
vector | An allocated interrupt vector |
- Returns
- 0, a negative errno otherwise