Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
gicv3_its.h File Reference

Driver for ARM Generic Interrupt Controller V3 Interrupt Translation Service. More...

Go to the source code of this file.

Data Structures

struct  its_driver_api
 ITS driver API. More...

Typedefs

typedef unsigned int(* its_api_alloc_intid_t) (const struct device *dev)
 Callback type for allocating an INTID.
typedef int(* its_api_setup_deviceid_t) (const struct device *dev, uint32_t device_id, unsigned int nites)
 Callback type for setting up a device ID.
typedef int(* its_api_map_intid_t) (const struct device *dev, uint32_t device_id, uint32_t event_id, unsigned int intid)
 Callback type for mapping an EventID to an INTID.
typedef int(* its_api_send_int_t) (const struct device *dev, uint32_t device_id, uint32_t event_id)
 Callback type for sending an interrupt.
typedef uint64_t(* its_api_get_msi_addr_t) (const struct device *dev)
 Callback type for retrieving the physical MSI target address.

Functions

static int its_alloc_intid (const struct device *dev)
 Allocate an INTID for an ITS device.
static int its_setup_deviceid (const struct device *dev, uint32_t device_id, unsigned int nites)
 Set up a device ID for an ITS device.
static int its_map_intid (const struct device *dev, uint32_t device_id, uint32_t event_id, unsigned int intid)
 Map an EventID to an INTID.
static int its_send_int (const struct device *dev, uint32_t device_id, uint32_t event_id)
 Send an interrupt for an EventID.
static uint64_t its_get_msi_addr (const struct device *dev)
 Get the physical MSI target address for an ITS device.

Detailed Description

Driver for ARM Generic Interrupt Controller V3 Interrupt Translation Service.

The Generic Interrupt Controller (GIC) Interrupt Translation Service translates an input EventID from a device, identified by its DeviceID, determines a corresponding INTID for this input and the target Redistributor and, through this, the target PE for that INTID.

Typedef Documentation

◆ its_api_alloc_intid_t

typedef unsigned int(* its_api_alloc_intid_t) (const struct device *dev)

Callback type for allocating an INTID.

Parameters
devITS device instance.
Returns
The allocated INTID.

◆ its_api_get_msi_addr_t

typedef uint64_t(* its_api_get_msi_addr_t) (const struct device *dev)

Callback type for retrieving the physical MSI target address.

Parameters
devITS device instance.
Returns
The physical MSI target address.

◆ its_api_map_intid_t

typedef int(* its_api_map_intid_t) (const struct device *dev, uint32_t device_id, uint32_t event_id, unsigned int intid)

Callback type for mapping an EventID to an INTID.

Parameters
devITS device instance.
device_idDevice ID of the endpoint.
event_idEvent ID to map.
intidINTID the EventID is mapped to.
Return values
0EventID mapped to INTID.
-EINVALINTID is less than 8192.
-EBUSYITS command queue is full.
-ETIMEDOUTITS command processing timed out.

◆ its_api_send_int_t

typedef int(* its_api_send_int_t) (const struct device *dev, uint32_t device_id, uint32_t event_id)

Callback type for sending an interrupt.

Parameters
devITS device instance.
device_idDevice ID of the endpoint.
event_idEvent ID to trigger.
Return values
0Interrupt command completed.
-EBUSYITS command queue is full.
-ETIMEDOUTITS command processing timed out.

◆ its_api_setup_deviceid_t

typedef int(* its_api_setup_deviceid_t) (const struct device *dev, uint32_t device_id, unsigned int nites)

Callback type for setting up a device ID.

Parameters
devITS device instance.
device_idDevice ID of the endpoint.
nitesNumber of ITEs to allocate for the device.
Return values
0Device ID set up.
-EINVALDevice ID does not fit in the indirect device table.
-ENOMEMMemory allocation failed.
-EBUSYITS command queue is full.
-ETIMEDOUTITS command processing timed out.

Function Documentation

◆ its_alloc_intid()

int its_alloc_intid ( const struct device * dev)
inlinestatic

Allocate an INTID for an ITS device.

Parameters
devITS device instance.
Returns
The allocated INTID.

◆ its_get_msi_addr()

uint64_t its_get_msi_addr ( const struct device * dev)
inlinestatic

Get the physical MSI target address for an ITS device.

The return type is 64 bits wide on all targets. The address value may still be limited by the provider's underlying address width.

Parameters
devITS device instance.
Returns
The physical MSI target address.

◆ its_map_intid()

int its_map_intid ( const struct device * dev,
uint32_t device_id,
uint32_t event_id,
unsigned int intid )
inlinestatic

Map an EventID to an INTID.

Parameters
devITS device instance.
device_idDevice ID of the endpoint.
event_idEvent ID to map.
intidINTID the EventID is mapped to.
Return values
0EventID mapped to INTID.
-EINVALINTID is less than 8192.
-EBUSYITS command queue is full.
-ETIMEDOUTITS command processing timed out.

◆ its_send_int()

int its_send_int ( const struct device * dev,
uint32_t device_id,
uint32_t event_id )
inlinestatic

Send an interrupt for an EventID.

Parameters
devITS device instance.
device_idDevice ID of the endpoint.
event_idEvent ID to trigger.
Return values
0Interrupt command completed.
-EBUSYITS command queue is full.
-ETIMEDOUTITS command processing timed out.

◆ its_setup_deviceid()

int its_setup_deviceid ( const struct device * dev,
uint32_t device_id,
unsigned int nites )
inlinestatic

Set up a device ID for an ITS device.

Parameters
devITS device instance.
device_idDevice ID of the endpoint.
nitesNumber of ITEs to allocate for the device.
Return values
0Device ID set up.
-EINVALDevice ID does not fit in the indirect device table.
-ENOMEMMemory allocation failed.
-EBUSYITS command queue is full.
-ETIMEDOUTITS command processing timed out.